From 10b37f8867f40495f1ffd531ab012423f9e492e6 Mon Sep 17 00:00:00 2001 From: Brianna Date: Tue, 22 Oct 2019 10:05:09 -0400 Subject: [PATCH] Added a message informing the user that a boss is in editing mode. --- .../src/com/songoda/epicbosses/commands/CommandSpawn.java | 7 +++++-- .../Core/src/com/songoda/epicbosses/utils/Message.java | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/commands/CommandSpawn.java b/plugin-modules/Core/src/com/songoda/epicbosses/commands/CommandSpawn.java index 58c48ab..3ac0a56 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/commands/CommandSpawn.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/commands/CommandSpawn.java @@ -62,8 +62,11 @@ public class CommandSpawn extends AbstractCommand { return ReturnType.FAILURE; } - BossAPI.spawnNewBoss(bossEntity, spawnLocation, null, null, false); - Message.Boss_Spawn_Spawned.msg(sender, bossInput, StringUtils.get().translateLocation(spawnLocation)); + if (BossAPI.spawnNewBoss(bossEntity, spawnLocation, null, null, false) != null) + Message.Boss_Spawn_Spawned.msg(sender, bossInput, StringUtils.get().translateLocation(spawnLocation)); + else + Message.Boss_Spawn_Editing.msg(sender); + return ReturnType.SUCCESS; } diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/utils/Message.java b/plugin-modules/Core/src/com/songoda/epicbosses/utils/Message.java index 9275a71..d2850ba 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/utils/Message.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/utils/Message.java @@ -134,6 +134,7 @@ public enum Message { Boss_Spawn_MustBePlayer("&c&l(!) &cTo use this command without an input of location you must be a player."), Boss_Spawn_InvalidBoss("&c&l(!) &cThe specified boss is not a valid type."), Boss_Spawn_Spawned("&c&l(!) &cYou have spawned a {0} boss at {1}."), + Boss_Spawn_Editing("&c&l(!) &cYou must disable editing for this boss before spawning it."), Boss_Statistics_SetChance("&b&lEpicBosses &8» &7You have {0} the health of the entity to &f{1}&7."), Boss_Statistics_SetDisplayName("&b&lEpicBosses &8» &7Your next input in to chat will be the display name for the entity. If you enter &f-&7 it will remove/clear the display name of the entity. For color codes use the &f& &7sign."),