mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-23 01:27:37 +00:00
cba to do this
This commit is contained in:
parent
be125f72f9
commit
3d3d92d72b
@ -10,11 +10,13 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.entity.EntitySpawnEvent;
|
||||
|
||||
import static dev.plex.util.PlexUtils.tl;
|
||||
|
||||
public class WorldListener extends PlexListener
|
||||
{
|
||||
// TODO: Actually implement permissions for every world properly
|
||||
private final String permission = plugin.config.getString("plex.adminworld.permission");
|
||||
|
||||
@EventHandler
|
||||
public void onBlockPlace(BlockPlaceEvent e)
|
||||
{
|
||||
@ -30,9 +32,10 @@ public class WorldListener extends PlexListener
|
||||
{
|
||||
return;
|
||||
}
|
||||
} else if (plugin.getSystem().equalsIgnoreCase("permissions"))
|
||||
}
|
||||
else if (plugin.getSystem().equalsIgnoreCase("permissions"))
|
||||
{
|
||||
if (player.hasPermission("plex.adminworld"))
|
||||
if (player.hasPermission(permission));
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -47,10 +50,6 @@ public class WorldListener extends PlexListener
|
||||
@EventHandler
|
||||
public void onEntitySpawn(EntitySpawnEvent e)
|
||||
{
|
||||
if (!e.getLocation().getWorld().getName().equals("fionn"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (e.getEntityType() != EntityType.SLIME)
|
||||
{
|
||||
return;
|
||||
|
@ -36,6 +36,7 @@ data:
|
||||
worlds:
|
||||
flatlands:
|
||||
name: "Flatlands"
|
||||
permission: "plex.world.flatlands"
|
||||
parameters:
|
||||
grass_block: 1
|
||||
dirt: 32
|
||||
@ -43,6 +44,7 @@ worlds:
|
||||
bedrock: 1
|
||||
adminworld:
|
||||
name: "Admin World"
|
||||
permission: "plex.world.adminworld"
|
||||
parameters:
|
||||
grass_block: 1
|
||||
dirt: 32
|
||||
@ -50,6 +52,7 @@ worlds:
|
||||
bedrock: 1
|
||||
masterbuilderworld:
|
||||
name: "MasterBuilder World"
|
||||
permission: "plex.world.masterbuilderworld"
|
||||
parameters:
|
||||
grass_block: 1
|
||||
dirt: 32
|
||||
|
Loading…
Reference in New Issue
Block a user