cba to do this

This commit is contained in:
Telesphoreo 2022-02-21 20:43:53 -06:00
parent be125f72f9
commit 3d3d92d72b
2 changed files with 9 additions and 7 deletions

View File

@ -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;

View File

@ -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