Compare commits
3 Commits
abe9cfbe76
...
2.8.12
Author | SHA1 | Date | |
---|---|---|---|
893f99c3e5 | |||
|
16e6af2fd4 | ||
fa1af88777 |
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>CommandGUI_V2</artifactId>
|
<artifactId>CommandGUI_V2</artifactId>
|
||||||
<version>2.8.7</version>
|
<version>2.8.9</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>CommandGUI</name>
|
<name>CommandGUI</name>
|
||||||
|
@@ -16,7 +16,7 @@ public class BListener implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPluginmessage(PluginMessageEvent event) {
|
public void onPluginmessage(PluginMessageEvent event) {
|
||||||
if (event.getTag().equalsIgnoreCase("cgui:bungee")) {
|
if (event.getTag().equalsIgnoreCase("cgui:bungee")) {
|
||||||
|
event.setCancelled(true);
|
||||||
DataInputStream stream = new DataInputStream(new ByteArrayInputStream(event.getData()));
|
DataInputStream stream = new DataInputStream(new ByteArrayInputStream(event.getData()));
|
||||||
try {
|
try {
|
||||||
String channel = stream.readUTF();
|
String channel = stream.readUTF();
|
||||||
@@ -41,25 +41,12 @@ public class BListener implements Listener {
|
|||||||
public void onJoin(PostLoginEvent e) {
|
public void onJoin(PostLoginEvent e) {
|
||||||
ProxiedPlayer player = e.getPlayer();
|
ProxiedPlayer player = e.getPlayer();
|
||||||
sendToSpigotPlayer(player.getName(), true);
|
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
|
@EventHandler
|
||||||
public void onDisconnect(PlayerDisconnectEvent e) {
|
public void onDisconnect(PlayerDisconnectEvent e) {
|
||||||
ProxiedPlayer player = e.getPlayer();
|
ProxiedPlayer player = e.getPlayer();
|
||||||
sendToSpigotPlayer(e.getPlayer().getName(), false);
|
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) {
|
public static void sendToSpigotPlayer(String name, Boolean join) {
|
||||||
|
@@ -52,10 +52,11 @@ public final class Main extends JavaPlugin {
|
|||||||
plugin = this;
|
plugin = this;
|
||||||
autor = this.getDescription().getAuthors();
|
autor = this.getDescription().getAuthors();
|
||||||
version = this.getDescription().getVersion();
|
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) {
|
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;
|
legacy = true;
|
||||||
}
|
}
|
||||||
if (pluginNotFound("T2CodeLib", 96388, Util.getRequiredT2CodeLibVersion())) return;
|
|
||||||
if (PluginCheck.pluginCheck("CommandGUI")) {
|
if (PluginCheck.pluginCheck("CommandGUI")) {
|
||||||
send.error(this, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
send.error(this, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||||
send.error(this, "");
|
send.error(this, "");
|
||||||
|
@@ -17,7 +17,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public class ConfigConverterUnderV5 {
|
public class ConfigConverterUnderV5 {
|
||||||
public static void renameMainFolder() {
|
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 oldF = new File("plugins/CommandGUI");
|
||||||
File newF = new File("plugins/T2C-CommandGUI");
|
File newF = new File("plugins/T2C-CommandGUI");
|
||||||
|
|
||||||
|
@@ -42,7 +42,6 @@ public class GUIListener implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onInventoryClick(InventoryClickEvent e) {
|
public void onInventoryClick(InventoryClickEvent e) {
|
||||||
Player player = (Player) e.getWhoClicked();
|
Player player = (Player) e.getWhoClicked();
|
||||||
JavaPlugin plugin = Main.getPlugin();
|
|
||||||
if (e.getInventory() == null) return;
|
if (e.getInventory() == null) return;
|
||||||
if (e.getCurrentItem() == null) return;
|
if (e.getCurrentItem() == null) return;
|
||||||
for (Gui gui : Main.guiHashMap.values()) {
|
for (Gui gui : Main.guiHashMap.values()) {
|
||||||
|
@@ -18,7 +18,7 @@ public class Permissions {
|
|||||||
public static final String useitem = key + "useitem";
|
public static final String useitem = key + "useitem";
|
||||||
public static final String getGuiItemAtLogin = key + "get.guiitem.at.login";
|
public static final String getGuiItemAtLogin = key + "get.guiitem.at.login";
|
||||||
public static final String giveItemOther = key + "giveitem.other";
|
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 player = key + "player";
|
||||||
public static final String admin = key + "admin";
|
public static final String admin = key + "admin";
|
||||||
|
@@ -4,7 +4,7 @@ main: de.jatitv.commandguiv2.Spigot.Main
|
|||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
prefix: T2C-CommandGUI
|
prefix: T2C-CommandGUI
|
||||||
authors: [ JaTiTV ]
|
authors: [ JaTiTV ]
|
||||||
depend:
|
softdepend:
|
||||||
- T2CodeLib
|
- T2CodeLib
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
|
@@ -54,4 +54,4 @@ Optional:
|
|||||||
---
|
---
|
||||||
|
|
||||||
<img src="https://bstats.org/signatures/bukkit/CGUI.svg" width="600">
|
<img src="https://bstats.org/signatures/bukkit/CGUI.svg" width="600">
|
||||||
<img src="https://i.imgur.com/tVLZGZg.png" width="600">
|
<img src="https://i.imgur.com/HoZSt7c.png" width="600">
|
||||||
|
Reference in New Issue
Block a user