Server Icon Error

Discussion in 'Plugin Development' started by davidovski, Apr 14, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    davidovski

    Since the release of server icons, i've been trying everything to get one for my server, hosting competitions on the discord, however, simply placing the file into the root folder, didn't affect the icon on the server list.

    Recently while writing my simple motd randomiser, i stumbled across the setServerIcon() method. before i knew it, i was trying to add this to my plugin, with help from this thread: https://bukkit.org/threads/cachedservericon.200574/

    Code:
    event.setServerIcon(Bukkit.loadServerIcon(new File("server.png")));
    I ran this on my localhost test server, and it ran with no problems, instantly, i copied over my plugin, and ran it. It was promising, until the ServerListPingEvent was called when i refreshed the list. The server instantly crashed, but not a normal kind of "watchdog report" crash. It just showed the following message on the console, and terminated it almost immediately. After attempting to copy the message to clipboard multiple times, i finally caught it and read it. It said:

    Code:
    >2017-04-14 12:24:51.456 java[34580:a0b] *** NSInvocation: warning: object 0x108d0b390 of class 'ThreadUtilities' does not implement methodSignatureForSelector: -- trouble ahead
    2017-04-14 12:24:51.459 java[34580:a0b] *** NSInvocation: warning: object 0x108d0b390 of class 'ThreadUtilities' does not implement doesNotRecognizeSelector: -- abort
    
    my theory is that because i run that server on a monitorless machine, it cannot run an "application", like it can on my laptop, a java program that simply calls itself "Main".

    If anyone has any ideas on how to fix this, it would be greatly appreciated. Thank you.
     
  2. Offline

    yPedx

    @davidovski
    When you moved the server icon into the root, did you rename it to server-icon.png? It has to be that, else it won't work.
     
  3. Offline

    davidovski

    i just did now... It crashes just like the plugin. :(
     
  4. Offline

    yPedx

    @davidovski
    Was the picture 64 x 64 pixels?
    Also, could you post the crash report?
     
  5. Offline

    davidovski

    The image is 64x64.
    And there is no crash report. That error is all there is. Like i said, it isn't a server crash of that sort.
     
  6. Offline

    Zombie_Striker

    @davidovski
    Whether or not you have a monitor should not matter.

    In this case, you are receiving an iOS exception. From what I can tell, Java does not always work on all versions of Mac. Try looking up your Mac version to see if anyone else reports the same problem.
     
  7. Offline

    thechrisanator

    @davidovski you dont need to do anything in a plugin to set the server icon.
    Get a 64x64 pixel image, put it into your server files, and rename it server-icon.png (it needs to be a png)
     
  8. Offline

    yPedx

    @thechrisanator
     
Thread Status:
Not open for further replies.

Share This Page