mirror of
https://github.com/plexusorg/Module-TFMExtras.git
synced 2024-12-22 01:07:37 +00:00
woops
This commit is contained in:
parent
070c57186b
commit
c225b57c2b
@ -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" ->
|
||||
|
@ -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"))
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user