From 5b5b48b3e7b554bd805e3a8abcdff52b1b47b445 Mon Sep 17 00:00:00 2001 From: Tutorialwork Date: Mon, 2 Sep 2019 18:26:50 +0200 Subject: [PATCH] Preparing Release 2.4 Fixed reporting yourself as chatlog --- .idea/workspace.xml | 17 ++++++++---- .../de/tutorialwork/commands/Chatlog.class | Bin 3044 -> 3202 bytes src/de/tutorialwork/commands/Chatlog.java | 26 ++++++++++-------- src/de/tutorialwork/main/Main.java | 2 +- src/plugin.yml | 2 +- 5 files changed, 28 insertions(+), 19 deletions(-) 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 d6627870f1d93d9ef1148610b737e66b78320832..d54346ad6dc5b89bd8219d0b87e443e1799b7fd0 100644 GIT binary patch delta 1169 zcmZ9LX-`~b6vuyew&!xWRy(YN3=FkccFIy|k=7z$Tg9R*Dz&x_!;}sT!!iT5wK`fA zmug+EwSsj)P4R_^fhGgBNh6qOqTj$YAtuHbegGrUsOM5OwKq5CdCvAfC+Gj1pK?z5 zlHdLL{;_eS1)+(>}Y>anNnh!$SrS^N6kX8XTa@;86}5 zJjNkg9M*Z<4hZV>DMB_*zab*5bHpH%0mV^+2!kTFF{BgK88(P9q8K$OWK3t=AWlMO zLT6Iv3B@tRaScyXBo;~RvJQE2=D%LnGNf5?oKWmmJSnvVz&htBaF$SN&8iIRd&l-< z2`3d#nLN!_lO)e*c&kH4gNf+KK%l8>G!l-6$9I`L%PEuRC{;Xf@&Z$e7foK`Ws_Gp zt$0-mn7qar#p@<-*!DMhOC!5AJRWHI2X1mC7Fd}JugpbFET%LH0xQ-DXJy{ooHcoe za~eiyBz7b+P<4D*VoG?|T6R{ZPn*o}p2>OMx7M76o)1huWXdXV<>r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8WgY{+rDGcM{5>NyS;N(mY=9rJo|f*YOC;(1H%KTz*9@ddFBH4h2QA zmq%$4$6A!jV^Xs*YK8Dq(ucU!ch6MS&J(msn^I(D;c7f7Z8o9*q*1f#Z@xfl(wcTn chZHoc3vVY%^Hk^#rInR;s1SuU!n0WW4-h`Z)Bpeg 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