Compare commits
3 Commits
abe9cfbe76
...
2.8.12
Author | SHA1 | Date | |
---|---|---|---|
893f99c3e5 | |||
|
16e6af2fd4 | ||
fa1af88777 |
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>CommandGUI_V2</artifactId>
|
||||
<version>2.8.7</version>
|
||||
<version>2.8.9</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>CommandGUI</name>
|
||||
|
@@ -16,18 +16,18 @@ public class BListener implements Listener {
|
||||
@EventHandler
|
||||
public void onPluginmessage(PluginMessageEvent event) {
|
||||
if (event.getTag().equalsIgnoreCase("cgui:bungee")) {
|
||||
|
||||
event.setCancelled(true);
|
||||
DataInputStream stream = new DataInputStream(new ByteArrayInputStream(event.getData()));
|
||||
try {
|
||||
String channel = stream.readUTF();
|
||||
String input = stream.readUTF();
|
||||
if (channel.equals("cgui-Console")) {
|
||||
ProxyServer.getInstance().getConsole().sendMessage("Command Console: "+ input);
|
||||
ProxyServer.getInstance().getConsole().sendMessage("Command Console: " + input);
|
||||
ProxyServer.getInstance().getPluginManager().dispatchCommand(ProxyServer.getInstance().getConsole(), input);
|
||||
} else {
|
||||
ProxiedPlayer player = ProxyServer.getInstance().getPlayer(channel);
|
||||
if (player != null) {
|
||||
ProxyServer.getInstance().getConsole().sendMessage("Command " + player +": "+ input);
|
||||
ProxyServer.getInstance().getConsole().sendMessage("Command " + player + ": " + input);
|
||||
ProxyServer.getInstance().getPluginManager().dispatchCommand(player, input);
|
||||
}
|
||||
}
|
||||
@@ -41,25 +41,12 @@ public class BListener implements Listener {
|
||||
public void onJoin(PostLoginEvent e) {
|
||||
ProxiedPlayer player = e.getPlayer();
|
||||
sendToSpigotPlayer(player.getName(), true);
|
||||
/*
|
||||
if (BMySQL.Enable) {
|
||||
BMySQL.query("INSERT INTO `gui-bungeeplayer` (`UUID`, `Name`, `Online`) VALUES ('" + player.getUniqueId() + "', '" + player.getName()
|
||||
+ "', 'true') ON DUPLICATE KEY UPDATE `Name` = '" + player.getName() + "', `Online` = 'true';");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onDisconnect(PlayerDisconnectEvent e) {
|
||||
ProxiedPlayer player = e.getPlayer();
|
||||
sendToSpigotPlayer(e.getPlayer().getName(), false);
|
||||
/*
|
||||
if (BMySQL.Enable) {
|
||||
BMySQL.query("INSERT INTO `gui-bungeeplayer` (`UUID`, `Name`, `Online`) VALUES ('" + player.getUniqueId() + "', '" + player.getName()
|
||||
+ "', 'true') ON DUPLICATE KEY UPDATE `Name` = '" + player.getName() + "', `Online` = 'false';");
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
public static void sendToSpigotPlayer(String name, Boolean join) {
|
||||
|
@@ -52,10 +52,11 @@ public final class Main extends JavaPlugin {
|
||||
plugin = this;
|
||||
autor = this.getDescription().getAuthors();
|
||||
version = this.getDescription().getVersion();
|
||||
if (pluginNotFound("T2CodeLib", 96388, Util.getRequiredT2CodeLibVersion())) return;
|
||||
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12 || MCVersion.minecraft1_13 || MCVersion.minecraft1_14 || MCVersion.minecraft1_15 || NMSVersion.v1_16_R1) {
|
||||
legacy = true;
|
||||
}
|
||||
if (pluginNotFound("T2CodeLib", 96388, Util.getRequiredT2CodeLibVersion())) return;
|
||||
|
||||
if (PluginCheck.pluginCheck("CommandGUI")) {
|
||||
send.error(this, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
send.error(this, "");
|
||||
|
@@ -17,7 +17,7 @@ import java.util.List;
|
||||
|
||||
public class ConfigConverterUnderV5 {
|
||||
public static void renameMainFolder() {
|
||||
if (new File("plugins/CommandGUI").exists()) {
|
||||
if (new File("plugins/CommandGUI").exists() && !Main.getPath().exists()) {
|
||||
File oldF = new File("plugins/CommandGUI");
|
||||
File newF = new File("plugins/T2C-CommandGUI");
|
||||
|
||||
|
@@ -42,7 +42,6 @@ public class GUIListener implements Listener {
|
||||
@EventHandler
|
||||
public void onInventoryClick(InventoryClickEvent e) {
|
||||
Player player = (Player) e.getWhoClicked();
|
||||
JavaPlugin plugin = Main.getPlugin();
|
||||
if (e.getInventory() == null) return;
|
||||
if (e.getCurrentItem() == null) return;
|
||||
for (Gui gui : Main.guiHashMap.values()) {
|
||||
|
@@ -18,7 +18,7 @@ public class Permissions {
|
||||
public static final String useitem = key + "useitem";
|
||||
public static final String getGuiItemAtLogin = key + "get.guiitem.at.login";
|
||||
public static final String giveItemOther = key + "giveitem.other";
|
||||
public static final String updatemsg = key + "updatemsgupdatemsg";
|
||||
public static final String updatemsg = key + "updatemsg";
|
||||
|
||||
public static final String player = key + "player";
|
||||
public static final String admin = key + "admin";
|
||||
|
@@ -4,7 +4,7 @@ main: de.jatitv.commandguiv2.Spigot.Main
|
||||
api-version: 1.13
|
||||
prefix: T2C-CommandGUI
|
||||
authors: [ JaTiTV ]
|
||||
depend:
|
||||
softdepend:
|
||||
- T2CodeLib
|
||||
|
||||
commands:
|
||||
|
Reference in New Issue
Block a user