diff --git a/.idea/workspace.xml b/.idea/workspace.xml index d2d11a2..fba39c4 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -7,14 +7,11 @@ - - - - - + + - + diff --git a/out/production/ProfessionalBans Reloaded/de/tutorialwork/commands/Chatlog.class b/out/production/ProfessionalBans Reloaded/de/tutorialwork/commands/Chatlog.class index d662787..d54346a 100644 Binary files a/out/production/ProfessionalBans Reloaded/de/tutorialwork/commands/Chatlog.class and b/out/production/ProfessionalBans Reloaded/de/tutorialwork/commands/Chatlog.class differ diff --git a/src/de/tutorialwork/commands/Chatlog.java b/src/de/tutorialwork/commands/Chatlog.java index dad96f4..b91e78a 100644 --- a/src/de/tutorialwork/commands/Chatlog.java +++ b/src/de/tutorialwork/commands/Chatlog.java @@ -30,19 +30,23 @@ public void execute(CommandSender sender, String[] args) { String UUID = UUIDFetcher.getUUID(args[0]); if(UUID != null){ if(BanManager.playerExists(UUID)){ - if(Chat.hasMessages(UUID)){ - String ID = Chat.createChatlog(UUID, p.getUniqueId().toString()); - p.sendMessage(Main.Prefix+"Der Chatlog von §e§l"+BanManager.getNameByUUID(UUID)+" §7wurde erfolgreich erstellt"); - File config = new File(Main.main.getDataFolder(), "config.yml"); - try { - Configuration cfg = ConfigurationProvider.getProvider(YamlConfiguration.class).load(config); - p.sendMessage(Main.Prefix+"Link: §e§l"+cfg.getString("CHATLOG.URL")+ID); - } catch (IOException e) { - e.printStackTrace(); + if(!p.getUniqueId().toString().equals(UUID)){ + if(Chat.hasMessages(UUID)){ + String ID = Chat.createChatlog(UUID, p.getUniqueId().toString()); + p.sendMessage(Main.Prefix+"Der Chatlog von §e§l"+BanManager.getNameByUUID(UUID)+" §7wurde erfolgreich erstellt"); + File config = new File(Main.main.getDataFolder(), "config.yml"); + try { + Configuration cfg = ConfigurationProvider.getProvider(YamlConfiguration.class).load(config); + p.sendMessage(Main.Prefix+"Link: §e§l"+cfg.getString("CHATLOG.URL")+ID); + } catch (IOException e) { + e.printStackTrace(); + } + LogManager.createEntry(UUID, p.getUniqueId().toString(), "CREATE_CHATLOG", ID); + } else { + p.sendMessage(Main.Prefix+"§cDieser Spieler hat in der letzten Zeit keine Nachrichten verfasst"); } - LogManager.createEntry(UUID, p.getUniqueId().toString(), "CREATE_CHATLOG", ID); } else { - p.sendMessage(Main.Prefix+"§cDieser Spieler hat in der letzten Zeit keine Nachrichten verfasst"); + p.sendMessage(Main.Prefix+"§cDu kannst kein Chatlog von dir selbst erstellen"); } } else { p.sendMessage(Main.Prefix+"§cDieser Spieler wurde nicht gefunden"); diff --git a/src/de/tutorialwork/main/Main.java b/src/de/tutorialwork/main/Main.java index 62b582d..1cf56af 100644 --- a/src/de/tutorialwork/main/Main.java +++ b/src/de/tutorialwork/main/Main.java @@ -46,7 +46,7 @@ public class Main extends Plugin { //============================================== //Plugin Informationen - public static String Version = "2.3"; + public static String Version = "2.4"; //============================================== @Override diff --git a/src/plugin.yml b/src/plugin.yml index 200f415..1a3b498 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,4 +1,4 @@ name: ProfessionalBans Reloaded author: Tutorialwork -version: 2.3 +version: 2.4 main: de.tutorialwork.main.Main \ No newline at end of file