HomeJavaModsMultipleMOTDBungee | Have a different MOTD and Icon depending on the IP being used
ModsJava

MultipleMOTDBungee | Have a different MOTD and Icon depending on the IP being used

⬇ Download on Spigot
What is this plugin?
MultipleMOTDBungee is a BungeeCord plugin that allows server owners to set a different Favicon(Server icon) and MOTD(Server Description) based on the ip that the user is trying to connect from.

Installation
  1. Download latest release of the plugin.
  2. Drag file to your Proxy's plugin folder.
  3. Start your proxy.

How do i use it though?
Simple, let's say that you want the ip myserver.net to show the MOTD "&4My Amazing BungeeCord" and the Favicon "icon-1.png", you'll have to set it up in config like this:

Code (Text):

Servers:
  Server1:
    ip: 'myserver.net'
    motd: '&4My Amazing BungeeCord'
    file: 'icon-1.png'
Default:
  motd: '&cMotd'
 
Also, you'll need to have the file "icon-1.png" in your plugin's folder ("plugins\MultipleMOTDBungee") othewise it won't work.

If you want to change the default MOTD it's as easy as changing the line Default.motd in config.yml!

Communication update:
How to recieve data on Spigot?
Simple, just create a plugin which implements PluginMessageListener and on the onEnable add this:

Code (Text):

        getServer().getMessenger().registerIncomingPluginChannel(this, "yourChannelOnBungee", this);
 
And to use the incoming data on spigot use:
Code (Text):


public void onPluginMessageReceived(String channel, Player player, byte[] bytes) {
        if (!channel.equals("yourChannelOnBungee")) {
            return;
        }

        ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
        DataInputStream in = new DataInputStream(stream);
        try {
          //Get the message from bungee
            String message = in.readUTF();
         //Log it into console for debugging purposes if you want to
            getLogger().info(text);
         //Do whatever you want with your data

       } catch (IOException e) {
            e.printStackTrace();
        }
    }

 
Future features?
I do not have any idea of what to add to it, just give me suggestions and please do not use the reviews section to post bug reports, use github.
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

MultipleMOTDBungee | Have a different MOTD and Icon depending on the IP being used is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 273 times (via Spigot). Download it and open it directly in the game.

Explore more