mirror of
https://github.com/plexusorg/Module-TFMExtras.git
synced 2024-11-17 17:16:12 +00:00
woops
This commit is contained in:
parent
070c57186b
commit
c225b57c2b
@ -38,6 +38,10 @@ public class MyWorldCommand extends PlexCommand
|
|||||||
{
|
{
|
||||||
return usage();
|
return usage();
|
||||||
}
|
}
|
||||||
|
if (!TFMExtras.getModule().enableIslands())
|
||||||
|
{
|
||||||
|
return mmString("<red>Islands are not enabled on this server!");
|
||||||
|
}
|
||||||
switch (args[0].toLowerCase())
|
switch (args[0].toLowerCase())
|
||||||
{
|
{
|
||||||
case "create" ->
|
case "create" ->
|
||||||
|
@ -32,6 +32,10 @@ public class SlimeManagerCommand extends PlexCommand
|
|||||||
{
|
{
|
||||||
return usage();
|
return usage();
|
||||||
}
|
}
|
||||||
|
if (!TFMExtras.getModule().enableIslands())
|
||||||
|
{
|
||||||
|
return mmString("<red>SlimeWorldManager is not on this server!");
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (args[0].equalsIgnoreCase("delete"))
|
if (args[0].equalsIgnoreCase("delete"))
|
||||||
|
@ -19,6 +19,7 @@ public class WorldListener extends PlexListener
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBuild(BlockPlaceEvent event)
|
public void onBuild(BlockPlaceEvent event)
|
||||||
{
|
{
|
||||||
|
if (!TFMExtras.getModule().enableIslands()) return;
|
||||||
if (!TFMExtras.getModule().getSlimeWorldHook().isWorldLoaded(event.getPlayer().getWorld().getName())) return;
|
if (!TFMExtras.getModule().getSlimeWorldHook().isWorldLoaded(event.getPlayer().getWorld().getName())) return;
|
||||||
final UUID worldOwner = UUID.fromString(event.getPlayer().getWorld().getName());
|
final UUID worldOwner = UUID.fromString(event.getPlayer().getWorld().getName());
|
||||||
final PlayerWorld world = TFMExtras.getModule().getIslandHandler().loadedIslands().get(worldOwner);
|
final PlayerWorld world = TFMExtras.getModule().getIslandHandler().loadedIslands().get(worldOwner);
|
||||||
@ -42,6 +43,7 @@ public class WorldListener extends PlexListener
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBreak(BlockBreakEvent event)
|
public void onBreak(BlockBreakEvent event)
|
||||||
{
|
{
|
||||||
|
if (!TFMExtras.getModule().enableIslands()) return;
|
||||||
if (!TFMExtras.getModule().getSlimeWorldHook().isWorldLoaded(event.getPlayer().getWorld().getName())) return;
|
if (!TFMExtras.getModule().getSlimeWorldHook().isWorldLoaded(event.getPlayer().getWorld().getName())) return;
|
||||||
final UUID worldOwner = UUID.fromString(event.getPlayer().getWorld().getName());
|
final UUID worldOwner = UUID.fromString(event.getPlayer().getWorld().getName());
|
||||||
final PlayerWorld world = TFMExtras.getModule().getIslandHandler().loadedIslands().get(worldOwner);
|
final PlayerWorld world = TFMExtras.getModule().getIslandHandler().loadedIslands().get(worldOwner);
|
||||||
@ -63,6 +65,7 @@ public class WorldListener extends PlexListener
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onInteract(PlayerInteractEvent event)
|
public void onInteract(PlayerInteractEvent event)
|
||||||
{
|
{
|
||||||
|
if (!TFMExtras.getModule().enableIslands()) return;
|
||||||
if (!TFMExtras.getModule().getSlimeWorldHook().isWorldLoaded(event.getPlayer().getWorld().getName())) return;
|
if (!TFMExtras.getModule().getSlimeWorldHook().isWorldLoaded(event.getPlayer().getWorld().getName())) return;
|
||||||
final UUID worldOwner = UUID.fromString(event.getPlayer().getWorld().getName());
|
final UUID worldOwner = UUID.fromString(event.getPlayer().getWorld().getName());
|
||||||
final PlayerWorld world = TFMExtras.getModule().getIslandHandler().loadedIslands().get(worldOwner);
|
final PlayerWorld world = TFMExtras.getModule().getIslandHandler().loadedIslands().get(worldOwner);
|
||||||
@ -84,6 +87,7 @@ public class WorldListener extends PlexListener
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onWorldChange(PlayerChangedWorldEvent event)
|
public void onWorldChange(PlayerChangedWorldEvent event)
|
||||||
{
|
{
|
||||||
|
if (!TFMExtras.getModule().enableIslands()) return;
|
||||||
if (!TFMExtras.getModule().getSlimeWorldHook().isWorldLoaded(event.getPlayer().getWorld().getName())) return;
|
if (!TFMExtras.getModule().getSlimeWorldHook().isWorldLoaded(event.getPlayer().getWorld().getName())) return;
|
||||||
final UUID worldOwner = UUID.fromString(event.getPlayer().getWorld().getName());
|
final UUID worldOwner = UUID.fromString(event.getPlayer().getWorld().getName());
|
||||||
final PlayerWorld world = TFMExtras.getModule().getIslandHandler().loadedIslands().get(worldOwner);
|
final PlayerWorld world = TFMExtras.getModule().getIslandHandler().loadedIslands().get(worldOwner);
|
||||||
|
Loading…
Reference in New Issue
Block a user