[Herocraft Development ] Minecraft Server Status Block [Paid] [Deleted]

it would be nice if this worked i paid for it. It hasnt worked yet
Same. Literally it has not worked. It should be very easy to setup. I shouldn't even have to contact my host to allow 25565's port through me site.
Its pretty much a waste of money.
Well, it seems to be working fine for the rest of us, so you may need to double-check that your system has all of the prerequisite software needed to use this add-on. It won't work without the required software.
 
@shadrxninga
I have been receiving a few unprecedented errors lately – not sure what these mean? It still works, but it's spamming my server errors alerts.
PHP:
Error Info

ErrorException: Undefined index: motd - library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php:157
Generated By: Unknown Account, Yesterday at 8:01 PM


Stack Trace

#0 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php(232): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/crysta...', 157)
#1 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php(157): HeroDev_MinecraftStatus_Helper_GS4QueryHelper->handlePhpError(8, 'Undefined index...', '/var/www/crysta...', 157, Array)
#2 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Helper/MinecraftQueryHelper.php(25): HeroDev_MinecraftStatus_Helper_GS4QueryHelper->getLongStatus()
#3 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Model/MinecraftServer.php(151): HeroDev_MinecraftStatus_Helper_MinecraftQueryHelper->queryMinecraftServer(Object(Zend_Db_Adapter_Mysqli), Array)
#4 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Model/MinecraftServer.php(134): HeroDev_MinecraftStatus_Model_MinecraftServer->queryMinecraftServer(Array)
#5 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/CronEntry/MinecraftQuery.php(8): HeroDev_MinecraftStatus_Model_MinecraftServer->queryMinecraftServers()
#6 [internal function]: HeroDev_MinecraftStatus_CronEntry_MinecraftQuery::queryMinecraftServers(Array)
#7 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Cron.php(356): call_user_func(Array, Array)
#8 /var/www/crystalcraftmc.com/public_html/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#9 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Deferred.php(256): XenForo_Deferred_Cron->execute(Array, Array, 7.9999978542328, '')
#10 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.9999978542328, '', false)
#11 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#12 /var/www/crystalcraftmc.com/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#13 {main}


Request State

array(3) {
  ["url"] => string(38) "http://crystalcraftmc.com/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(1) "/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

PHP:
Error Info

ErrorException: Undefined offset: 1 - library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php:147
Generated By: Unknown Account, Yesterday at 8:01 PM


Stack Trace

#0 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php(232): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/var/www/crysta...', 147)
#1 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php(147): HeroDev_MinecraftStatus_Helper_GS4QueryHelper->handlePhpError(8, 'Undefined offse...', '/var/www/crysta...', 147, Array)
#2 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Helper/MinecraftQueryHelper.php(25): HeroDev_MinecraftStatus_Helper_GS4QueryHelper->getLongStatus()
#3 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Model/MinecraftServer.php(151): HeroDev_MinecraftStatus_Helper_MinecraftQueryHelper->queryMinecraftServer(Object(Zend_Db_Adapter_Mysqli), Array)
#4 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Model/MinecraftServer.php(134): HeroDev_MinecraftStatus_Model_MinecraftServer->queryMinecraftServer(Array)
#5 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/CronEntry/MinecraftQuery.php(8): HeroDev_MinecraftStatus_Model_MinecraftServer->queryMinecraftServers()
#6 [internal function]: HeroDev_MinecraftStatus_CronEntry_MinecraftQuery::queryMinecraftServers(Array)
#7 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Cron.php(356): call_user_func(Array, Array)
#8 /var/www/crystalcraftmc.com/public_html/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#9 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Deferred.php(256): XenForo_Deferred_Cron->execute(Array, Array, 7.9999978542328, '')
#10 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.9999978542328, '', false)
#11 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#12 /var/www/crystalcraftmc.com/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#13 {main}


Request State

array(3) {
  ["url"] => string(38) "http://crystalcraftmc.com/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(1) "/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
First off, I'll apologise for not responding to the messages here. It may not be much of an excuse but I've been busy with exams that have only recently finished.

it would be nice if this worked i paid for it. It hasnt worked yet
Check your PMs.
Same. Literally it has not worked. It should be very easy to setup. I shouldn't even have to contact my host to allow 25565's port through me site.
Its pretty much a waste of money.
You're right, it should be easy to setup. The problem is that this add-on has requirements that can only be met by either contacting your host or by having root access to the machine so you can meet those requirements yourself. You should not need to contact your host to open port 25565 on your website; however you do need to make sure your host isn't blocking traffic to the port 25565 (or any other port your are trying to query) on another server (your minecraft server).

There are other requirements to that are listed on the resource page:
XenPorta or WidgetFramework
Web host with support for sockets. (The functions fwrite, fread and fsockopen must be enabled)
Firewall on webserver must also outgoing connections to your query port.
PHP extentions: mbstring (Dependency will be removed in later versions, most hosts have this installed by default)

I don't like these requirements myself. I've had to deal with so many support queries and the problem is they're all a bit different. I'll try and remove as many of these requirements over the next few weeks. In the meantime, send me a PM and we'll try and fix the problems you're having. I'll reply as soon as I get it.

@shadrxninga
I have been receiving a few unprecedented errors lately – not sure what these mean? It still works, but it's spamming my server errors alerts.
PHP:
Error Info

ErrorException: Undefined index: motd - library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php:157
Generated By: Unknown Account, Yesterday at 8:01 PM


Stack Trace

#0 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php(232): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/crysta...', 157)
#1 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php(157): HeroDev_MinecraftStatus_Helper_GS4QueryHelper->handlePhpError(8, 'Undefined index...', '/var/www/crysta...', 157, Array)
#2 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Helper/MinecraftQueryHelper.php(25): HeroDev_MinecraftStatus_Helper_GS4QueryHelper->getLongStatus()
#3 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Model/MinecraftServer.php(151): HeroDev_MinecraftStatus_Helper_MinecraftQueryHelper->queryMinecraftServer(Object(Zend_Db_Adapter_Mysqli), Array)
#4 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Model/MinecraftServer.php(134): HeroDev_MinecraftStatus_Model_MinecraftServer->queryMinecraftServer(Array)
#5 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/CronEntry/MinecraftQuery.php(8): HeroDev_MinecraftStatus_Model_MinecraftServer->queryMinecraftServers()
#6 [internal function]: HeroDev_MinecraftStatus_CronEntry_MinecraftQuery::queryMinecraftServers(Array)
#7 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Cron.php(356): call_user_func(Array, Array)
#8 /var/www/crystalcraftmc.com/public_html/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#9 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Deferred.php(256): XenForo_Deferred_Cron->execute(Array, Array, 7.9999978542328, '')
#10 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.9999978542328, '', false)
#11 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#12 /var/www/crystalcraftmc.com/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#13 {main}


Request State

array(3) {
  ["url"] => string(38) "http://crystalcraftmc.com/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(1) "/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

PHP:
Error Info

ErrorException: Undefined offset: 1 - library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php:147
Generated By: Unknown Account, Yesterday at 8:01 PM


Stack Trace

#0 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php(232): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/var/www/crysta...', 147)
#1 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php(147): HeroDev_MinecraftStatus_Helper_GS4QueryHelper->handlePhpError(8, 'Undefined offse...', '/var/www/crysta...', 147, Array)
#2 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Helper/MinecraftQueryHelper.php(25): HeroDev_MinecraftStatus_Helper_GS4QueryHelper->getLongStatus()
#3 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Model/MinecraftServer.php(151): HeroDev_MinecraftStatus_Helper_MinecraftQueryHelper->queryMinecraftServer(Object(Zend_Db_Adapter_Mysqli), Array)
#4 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/Model/MinecraftServer.php(134): HeroDev_MinecraftStatus_Model_MinecraftServer->queryMinecraftServer(Array)
#5 /var/www/crystalcraftmc.com/public_html/library/HeroDev/MinecraftStatus/CronEntry/MinecraftQuery.php(8): HeroDev_MinecraftStatus_Model_MinecraftServer->queryMinecraftServers()
#6 [internal function]: HeroDev_MinecraftStatus_CronEntry_MinecraftQuery::queryMinecraftServers(Array)
#7 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Cron.php(356): call_user_func(Array, Array)
#8 /var/www/crystalcraftmc.com/public_html/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#9 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Deferred.php(256): XenForo_Deferred_Cron->execute(Array, Array, 7.9999978542328, '')
#10 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.9999978542328, '', false)
#11 /var/www/crystalcraftmc.com/public_html/library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#12 /var/www/crystalcraftmc.com/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#13 {main}


Request State

array(3) {
  ["url"] => string(38) "http://crystalcraftmc.com/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(1) "/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
I have a feeling these error message occur when the query data that gets sent back from the sever is malformed, which would explain why it only happens now and then. I'm looking into away to try and prevent these from spamming the server logs. (i.e by retrying if these error occur and giving a more helpful error if it fails numerous times)
 
I have a feeling these error message occur when the query data that gets sent back from the sever is malformed, which would explain why it only happens now and then. I'm looking into away to try and prevent these from spamming the server logs. (i.e by retrying if these error occur and giving a more helpful error if it fails numerous times)
Awesome, sounds great! Thanks for the quick response.
 
Can you add cravatar support? minotar keep a lot loading all heads....
Cravatar is faster for me as well – another XF developer switched his add-on to use Cravatar instead of Minotar because of loading speeds, and I noticed a significant speed increase!

@shadrxninga
Might be a nice feature to integrate multiple Minecraft avatar sites depending on a customer's connection to each site? Cravatar works better on the US East Coast than Minotar does, that I'm sure of.
 
i just edited his plugin by editing template and use cravatar, it work a loooooooot better, take 1-2 second to load avatar, with minotar it take 30-60 second...
 
i just edited his plugin by editing template and use cravatar, it work a loooooooot better, take 1-2 second to load avatar, with minotar it take 30-60 second...
Which file did you edit to do this? I just logged through all of the files in the /library/HeroDev/MinecraftStatus folder to no avail.
 
use xenforo template editor and edit herodev_minecraftstatus_widget_status and EWRblock_MinecraftServerStatus
replace
HTML:
{$player.profileLink} class="MinecraftAvatar avatar"><img width="18" height="18" data-offsetx="-8px" class="Tooltip" title="{$player.username}" src="https://minotar.net/avatar/{$player.username}/30.png"/>
with
HTML:
{$player.profileLink} class="MinecraftAvatar avatar"><img width="18" height="18" data-offsetx="-8px" class="Tooltip" title="{$player.username}" src="https://cravatar.eu/avatar/{$player.username}/30.png"/>
 
Last edited:
use xenforo template editor and edit herodev_minecraftstatus_widget_status and EWRblock_MinecraftServerStatus
replace
{$player.profileLink} class="MinecraftAvatar avatar"><img width="18" height="18" data-offsetx="-8px" class="Tooltip" title="{$player.username}" src="https://minotar.net/avatar/{$player.username}/30.png"/>
with
{$player.profileLink} class="MinecraftAvatar avatar"><img width="18" height="18" data-offsetx="-8px" class="Tooltip" title="{$player.username}" src="https://cravatar.eu/avatar/{$player.username}/30.png"/>
Thanks, that helps so much!
 
Hi, Plugin has never worked for me on the 'Full Status' option.
Whenever I press save it generates an error, I've sent you a PM a month ago and you haven't replied yet, Please assist me.
PHP:
Error Info
ErrorException: Fatal Error: Call to undefined function mb_convert_encoding() - library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php:216
Generated By: *****, 5 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(51) "http://*****.net/admin.php?minecraft-servers/1/save"
  ["_GET"] => array(1) {
    ["minecraft-servers/1/save"] => string(0) ""
  }
  ["_POST"] => array(10) {
    ["name"] => string(5) "*****"
    ["address"] => string(13) "***.**.**.***"
    ["query_port"] => string(5) "*****"
    ["query_type"] => string(11) "full_status"
    ["active"] => string(1) "1"
    ["display_order"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(35) "/admin.php?minecraft-servers/1/edit"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Last edited:
Hi, Plugin has never worked for me on the 'Full Status' option.
Whenever I press save it generates an error, I've sent you a PM a month ago and you haven't replied yet, Please assist me.
PHP:
Error Info
ErrorException: Fatal Error: Call to undefined function mb_convert_encoding() - library/HeroDev/MinecraftStatus/Helper/GS4QueryHelper.php:216
Generated By: *****, 5 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(51) "http://*****.net/admin.php?minecraft-servers/1/save"
  ["_GET"] => array(1) {
    ["minecraft-servers/1/save"] => string(0) ""
  }
  ["_POST"] => array(10) {
    ["name"] => string(5) "*****"
    ["address"] => string(13) "***.**.**.***"
    ["query_port"] => string(5) "*****"
    ["query_type"] => string(11) "full_status"
    ["active"] => string(1) "1"
    ["display_order"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(35) "/admin.php?minecraft-servers/1/edit"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}

This is NOT a server error, Everything is correctly configured from my point.
This is a server error.

You need to have the php extension 'mbstring' installed on your server for this add-on to work. This is listed in the requirements section in the description.
PHP extentions: mbstring (Dependency will be removed in later versions, most hosts have this installed by default)

If you're using shared hosting contact your host and ask if they can install it, if you have root access to the server then you can install it yourself. (I can help with this if needed)
 
Probably not going to get support. But, I tried to hack together a widget for Xenporta 2, when I try and add it into the layout I get this error.

Code:
Mysqli statement execute error : Duplicate entry 'EWRblock_MinecraftServerStatus-0' for key 'title_style_id'

Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1624
XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1613
XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1405
XenForo_DataWriter->save() in EWRporta2/Model/Templates.php at line 60
EWRporta2_Model_Templates->importTemplatesXml() in EWRporta2/Model/Widgets.php at line 202
EWRporta2_Model_Widgets->installWidgetXml() in EWRporta2/Model/Widgets.php at line 145
EWRporta2_Model_Widgets->installWidget() in EWRporta2/ControllerAdmin/Widgets.php at line 334
EWRporta2_ControllerAdmin_Widgets->actionInstallConfirm() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /Library/Server/Web/Data/Sites/Default/admin.php at line 13

Any thoughts? Should I just stop failing and use Xenporta 1?
 
A little update. I was able to trash the "EWRblock_MinecraftServerStatus" template by enabling Debug mode and removing from Master Template.

Now, it installs. But, it doesn't display anything. I set up the widgets and I get this.

Code:
Undefined offset: 1

XenForo_Application::handlePhpError() in EWRporta2/ControllerAdmin/Widopts.php at line 92
EWRporta2_ControllerAdmin_Widopts->actionOptions() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /Library/Server/Web/Data/Sites/Default/admin.php at line 13
 
hello, i have installed xenporta 2 pro. once installed and configured MSSB, will appear a block in the sidebar or not? i'm not using any widget framework from xenporta 2, so that actually sidebar will be only visible in the forums page, like if i've not installed xenporta 2. But i need to know if the block will appear or not, to be sure
 
@shadrxninga this is not working as a widget with XenPorta 2
The PHP file has been placed in the new EWRPorta2 widget folder, and the xml in the xml folder.

Upon trying to add this widget I get

Uji65IP.png

Edit: After a bit of work, I'm finally able to install it as a widget, but still not able to get it to display.

Here are my edits that install perfectly fine and add the widget perfectly fine, just not able to get the widget showing after adding to the article layout:


MinecraftServerStatus.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<widget widget_id="MinecraftServerStatus" widget_title="Minecraft Server Status" widget_desc="Displays Minecraft server status" widget_string="2.2.0-b2" widget_version="1" widget_url="http://shadrx.com" widget_install_class="" widget_install_method="" widget_uninstall_class="" widget_uninstall_method="" cache="now">
  <listeners/>
  <options/>
  <phrases/>
  <templates>
  <template title="EWRwidget_MinecraftServerStatus"><![CDATA[<xen:require css="wf_default.css" />
<xen:require css="herodev_minecraftstatus_widget_status.css" />

<xen:if hascontent="true">
<div class="section minecraftServerStatus">
   <div class="secondaryContent">
   <h3>Minecraft Server Status</h3>
   <xen:contentcheck>
   <xen:foreach loop="$MinecraftServerStatus" value="$minecraftServer">
     <xen:if is="{$minecraftServer.online}">
       <div class="minecraftServer online">
        <h4 class="minorHeading">{$minecraftServer.name}</h4>

        <div class="info">
          <span class="prefix prefixLightGreen">{$minecraftServer.numplayers}/{$minecraftServer.maxplayers}</span>
        </div>

        <xen:if is="{$minecraftServer.playerList}">
          <div class="playerList">
             <xen:foreach loop="$minecraftServer.playerList" key="$key" value="$player" i="$i">
                 <a {$player.profileLink} class="MinecraftAvatar avatar"><img width="18" height="18" data-offsetx="-8px" class="Tooltip" title="{$player.username}" src="https://minotar.net/avatar/{$player.username}/30.png"/></a>
             </xen:foreach>
          </div>
        </xen:if>

        <p class="lastUpdated">Last Updated: <xen:datetime time="{$minecraftServer.last_query_date}" class="faint"/></p>
       </div>
      <xen:else />
        <div class="minecraftServer offline">
         <h4 class="minorHeading"> {$minecraftServer.name}</h4>

          <div class="info">
            <span class="prefix prefixRed">Offline</span>
          </div>

         <p class="lastUpdated">Last Updated: <xen:datetime time="{$minecraftServer.last_query_date}" class="faint"/></p>
        </div>
      </xen:if>
   </xen:foreach>
   </xen:contentcheck>
   </div>
</xen:if>]]></template>
  </templates>
</widget>

MinecraftServerStatus.php
Code:
<?php

class EWRporta2_Widget_MinecraftServerStatus extends XenForo_Model
{
   public function getBypass()
   {
  $minecraftServerModel = $this->_getMinecraftServerModel();

  //Get all active minecraft servers from the database
  $minecraftServers = $minecraftServerModel->prepareMinecraftServers($minecraftServerModel->getAllActiveMinecraftServers());

     return $minecraftServers;
   }


  /**
  * Creates and returns the minecraft server model
  * @return HeroDev_MinecraftStatus_Model_MinecraftServer
  */
  protected function _getMinecraftServerModel(){
  return $this->getModelFromCache('HeroDev_MinecraftStatus_Model_MinecraftServer');
  }
}
 
Last edited:
Top Bottom