Clean commands a bit.
This commit is contained in:
parent
8e3f750c7c
commit
4ba6993039
@ -31,7 +31,7 @@ public class CommandAlert extends Command
|
|||||||
|
|
||||||
for (String s : args)
|
for (String s : args)
|
||||||
{
|
{
|
||||||
s = s.replace("&h", "");
|
s = s.substring(1, s.length());
|
||||||
builder.append(ChatColor.translateAlternateColorCodes('&', s));
|
builder.append(ChatColor.translateAlternateColorCodes('&', s));
|
||||||
builder.append(" ");
|
builder.append(" ");
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ package net.md_5.bungee.command;
|
|||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
|
||||||
import net.md_5.bungee.api.plugin.Command;
|
import net.md_5.bungee.api.plugin.Command;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -27,6 +26,6 @@ public class CommandMotd extends Command
|
|||||||
newMOTD.append(s);
|
newMOTD.append(s);
|
||||||
newMOTD.append(" ");
|
newMOTD.append(" ");
|
||||||
}
|
}
|
||||||
((BungeeCord) ProxyServer.getInstance()).config.motd = ChatColor.translateAlternateColorCodes('&', newMOTD.substring(0, newMOTD.length() - 1));
|
BungeeCord.getInstance().config.motd = ChatColor.translateAlternateColorCodes('&', newMOTD.substring(0, newMOTD.length() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ package net.md_5.bungee.command;
|
|||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
|
||||||
import net.md_5.bungee.api.plugin.Command;
|
import net.md_5.bungee.api.plugin.Command;
|
||||||
|
|
||||||
public class CommandReload extends Command
|
public class CommandReload extends Command
|
||||||
@ -17,7 +16,7 @@ public class CommandReload extends Command
|
|||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args)
|
public void execute(CommandSender sender, String[] args)
|
||||||
{
|
{
|
||||||
((BungeeCord) ProxyServer.getInstance()).config.load();
|
BungeeCord.getInstance().config.load();
|
||||||
sender.sendMessage(ChatColor.GREEN + "Reloaded config, please restart if you have any issues");
|
sender.sendMessage(ChatColor.GREEN + "Reloaded config, please restart if you have any issues");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package net.md_5.bungee.command;
|
package net.md_5.bungee.command;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import net.md_5.bungee.BungeeCord;
|
|
||||||
import net.md_5.bungee.UserConnection;
|
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
|
@ -2,6 +2,7 @@ package net.md_5.bungee.command;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import lombok.Getter;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
|
|
||||||
@ -11,7 +12,12 @@ import net.md_5.bungee.api.CommandSender;
|
|||||||
public class ConsoleCommandSender implements CommandSender
|
public class ConsoleCommandSender implements CommandSender
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final ConsoleCommandSender instance = new ConsoleCommandSender();
|
@Getter
|
||||||
|
private static final ConsoleCommandSender instance = new ConsoleCommandSender();
|
||||||
|
|
||||||
|
private ConsoleCommandSender()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(String message)
|
public void sendMessage(String message)
|
||||||
|
@ -2,11 +2,8 @@ package net.md_5.bungee.packet;
|
|||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.EOFException;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import net.md_5.bungee.Util;
|
|
||||||
import net.md_5.mendax.PacketDefinitions;
|
|
||||||
import net.md_5.mendax.datainput.DataInputPacketReader;
|
import net.md_5.mendax.datainput.DataInputPacketReader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user