From 4c7d0c91f1550a7a20e62797b3f5c18f0c12fb93 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Thu, 31 Dec 2015 16:12:57 +0100 Subject: [PATCH] Fixed some message bugs Now ready for a release :) --- src/io/github/dre2n/dungeonsxl/DungeonsXL.java | 6 +++--- src/io/github/dre2n/dungeonsxl/file/DMessages.java | 13 ++++++++----- src/plugin.yml | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/io/github/dre2n/dungeonsxl/DungeonsXL.java b/src/io/github/dre2n/dungeonsxl/DungeonsXL.java index c5ad9bfc..f615ed4e 100644 --- a/src/io/github/dre2n/dungeonsxl/DungeonsXL.java +++ b/src/io/github/dre2n/dungeonsxl/DungeonsXL.java @@ -68,6 +68,9 @@ public class DungeonsXL extends JavaPlugin { plugin = this; getDataFolder().mkdir(); + // InitFolders + initFolders(); + // Load Language loadDMessages(new File(plugin.getDataFolder(), "languages/en.yml")); // Load Config @@ -79,9 +82,6 @@ public class DungeonsXL extends JavaPlugin { loadDSigns(); loadDungeons(); - // InitFolders - initFolders(); - // Setup Permissions loadPermissionProvider(); diff --git a/src/io/github/dre2n/dungeonsxl/file/DMessages.java b/src/io/github/dre2n/dungeonsxl/file/DMessages.java index c38f6e4c..5bca9937 100644 --- a/src/io/github/dre2n/dungeonsxl/file/DMessages.java +++ b/src/io/github/dre2n/dungeonsxl/file/DMessages.java @@ -20,12 +20,12 @@ public class DMessages { PLAYER_BLOCK_INFO("Player_BlockInfo", "&6Block-ID: &2&v1"), PLAYER_CHECKPOINT_REACHED("Player_CheckpointReached", "&6Checkpoint reached!"), - PLAYER_DEATH("Player_Death", "&6You died, lives left: &2v1"), - PLAYER_DEATH_KICK("Player_DeathKick", "&2v1&6 died and lost his last life."), + PLAYER_DEATH("Player_Death", "&6You died, lives left: &2&v1"), + PLAYER_DEATH_KICK("Player_DeathKick", "&2&v1&6 died and lost his last life."), PLAYER_FINISHED_DUNGEON("Player_FinishedDungeon", "&6You successfully finished the Dungeon!"), - PLAYER_JOIN_GROUP("Player_JoinGroup", "&Player &4&v1&6 has joined the Group!"), + PLAYER_JOIN_GROUP("Player_JoinGroup", "&6Player &4&v1&6 has joined the Group!"), PLAYER_LEAVE_GROUP("Player_LeaveGroup", "&6You have successfully left your group!"), - PLAYER_LEFT_GROUP("Player_LeftGroup", "&Player &4&v1&6 has left the Group!"), + PLAYER_LEFT_GROUP("Player_LeftGroup", "&6Player &4&v1&6 has left the Group!"), PLAYER_LOOT_ADDED("Player_LootAdded", "&4&v1&6 have been added to your reward inventory!"), PLAYER_OFFLINE("Player_Offline", "&Player &4&v1&6 went offline. In &4&v2&6 seconds he will autmatically be kicked from the Dungeon!"), PLAYER_OFFLINE_NEVER("Player_OfflineNever", "&Player &4&v1&6 went offline. He will &4not&6 be kicked from the Dungeon automatically!"), @@ -194,7 +194,10 @@ public class DMessages { if (config != null) { Set keySet = config.getKeys(false); for (String key : keySet) { - Messages.getByIdentifier(key).setMessage(config.getString(key)); + Messages message = Messages.getByIdentifier(key); + if (message != null) { + message.setMessage(config.getString(key)); + } } } } diff --git a/src/plugin.yml b/src/plugin.yml index 52d49253..49ed871e 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: DungeonsXL main: io.github.dre2n.dungeonsxl.DungeonsXL -version: 0.10-SNAPSHOT +version: 0.10 author: Frank Baumann authors: [Frank Baumann, Milan Albrecht, Tobias Schmitz, Daniel Saukel] website: https://dre2n.github.io