mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-09-18 19:11:09 +02:00
Fix msg command
This commit is contained in:
parent
f8ea5eff69
commit
8402311e6f
@ -24,6 +24,7 @@ import de.erethon.dungeonsxl.config.DMessage;
|
||||
import de.erethon.dungeonsxl.player.DPermission;
|
||||
import de.erethon.dungeonsxl.world.DResourceWorld;
|
||||
import de.erethon.dungeonsxl.world.WorldConfig;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -64,6 +65,10 @@ public class MsgCommand extends DCommand {
|
||||
|
||||
WorldConfig config = ((DResourceWorld) editWorld.getResource()).getConfig(true);
|
||||
Map<Integer, String> msgs = config.getState(GameRule.MESSAGES);
|
||||
if (msgs == null) {
|
||||
config.setState(GameRule.MESSAGES, new HashMap<>());
|
||||
msgs = config.getState(GameRule.MESSAGES);
|
||||
}
|
||||
|
||||
if (args.length == 2) {
|
||||
String msg = msgs.get(id);
|
||||
|
Loading…
Reference in New Issue
Block a user