Skip to content

Commit

Permalink
Preparing Release 2.4
Browse files Browse the repository at this point in the history
Fixed reporting yourself as chatlog
  • Loading branch information
Tutorialwork committed Sep 2, 2019
1 parent 0f27374 commit 5b5b48b
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
17 changes: 11 additions & 6 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
26 changes: 15 additions & 11 deletions src/de/tutorialwork/commands/Chatlog.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/de/tutorialwork/main/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class Main extends Plugin {

//==============================================
//Plugin Informationen
public static String Version = "2.3";
public static String Version = "2.4";
//==============================================

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ProfessionalBans Reloaded
author: Tutorialwork
version: 2.3
version: 2.4
main: de.tutorialwork.main.Main

0 comments on commit 5b5b48b

Please sign in to comment.