This commit is contained in:
Taah 2024-05-06 12:39:19 -07:00
parent 070c57186b
commit c225b57c2b
3 changed files with 12 additions and 0 deletions

View File

@ -38,6 +38,10 @@ public class MyWorldCommand extends PlexCommand
{
return usage();
}
if (!TFMExtras.getModule().enableIslands())
{
return mmString("<red>Islands are not enabled on this server!");
}
switch (args[0].toLowerCase())
{
case "create" ->

View File

@ -32,6 +32,10 @@ public class SlimeManagerCommand extends PlexCommand
{
return usage();
}
if (!TFMExtras.getModule().enableIslands())
{
return mmString("<red>SlimeWorldManager is not on this server!");
}
try
{
if (args[0].equalsIgnoreCase("delete"))

View File

@ -19,6 +19,7 @@ public class WorldListener extends PlexListener
@EventHandler
public void onBuild(BlockPlaceEvent event)
{
if (!TFMExtras.getModule().enableIslands()) return;
if (!TFMExtras.getModule().getSlimeWorldHook().isWorldLoaded(event.getPlayer().getWorld().getName())) return;
final UUID worldOwner = UUID.fromString(event.getPlayer().getWorld().getName());
final PlayerWorld world = TFMExtras.getModule().getIslandHandler().loadedIslands().get(worldOwner);
@ -42,6 +43,7 @@ public class WorldListener extends PlexListener
@EventHandler
public void onBreak(BlockBreakEvent event)
{
if (!TFMExtras.getModule().enableIslands()) return;
if (!TFMExtras.getModule().getSlimeWorldHook().isWorldLoaded(event.getPlayer().getWorld().getName())) return;
final UUID worldOwner = UUID.fromString(event.getPlayer().getWorld().getName());
final PlayerWorld world = TFMExtras.getModule().getIslandHandler().loadedIslands().get(worldOwner);
@ -63,6 +65,7 @@ public class WorldListener extends PlexListener
@EventHandler
public void onInteract(PlayerInteractEvent event)
{
if (!TFMExtras.getModule().enableIslands()) return;
if (!TFMExtras.getModule().getSlimeWorldHook().isWorldLoaded(event.getPlayer().getWorld().getName())) return;
final UUID worldOwner = UUID.fromString(event.getPlayer().getWorld().getName());
final PlayerWorld world = TFMExtras.getModule().getIslandHandler().loadedIslands().get(worldOwner);
@ -84,6 +87,7 @@ public class WorldListener extends PlexListener
@EventHandler
public void onWorldChange(PlayerChangedWorldEvent event)
{
if (!TFMExtras.getModule().enableIslands()) return;
if (!TFMExtras.getModule().getSlimeWorldHook().isWorldLoaded(event.getPlayer().getWorld().getName())) return;
final UUID worldOwner = UUID.fromString(event.getPlayer().getWorld().getName());
final PlayerWorld world = TFMExtras.getModule().getIslandHandler().loadedIslands().get(worldOwner);