mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Added some missing stuff for MB World (#61)
* Added some missing stuff for MB World * Fix isExecutive method
This commit is contained in:
parent
6853baebdd
commit
7b1a8cb527
@ -1,8 +1,5 @@
|
|||||||
package me.totalfreedom.totalfreedommod.fun;
|
package me.totalfreedom.totalfreedommod.fun;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Random;
|
|
||||||
import java.util.Set;
|
|
||||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||||
import me.totalfreedom.totalfreedommod.util.DepreciationAggregator;
|
import me.totalfreedom.totalfreedommod.util.DepreciationAggregator;
|
||||||
@ -14,6 +11,10 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.player.PlayerMoveEvent;
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Random;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
public class Trailer extends FreedomService
|
public class Trailer extends FreedomService
|
||||||
{
|
{
|
||||||
private final Random random = new Random();
|
private final Random random = new Random();
|
||||||
@ -47,6 +48,11 @@ public class Trailer extends FreedomService
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getPlayer().getWorld().equals(plugin.wm.masterBuilderWorld.getWorld()))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Block fromBlock = event.getFrom().getBlock();
|
Block fromBlock = event.getFrom().getBlock();
|
||||||
if (!fromBlock.isEmpty())
|
if (!fromBlock.isEmpty())
|
||||||
{
|
{
|
||||||
@ -70,7 +76,8 @@ public class Trailer extends FreedomService
|
|||||||
{
|
{
|
||||||
final Location trail_pos;
|
final Location trail_pos;
|
||||||
trail_pos = new Location(event.getPlayer().getWorld(), fromBlock.getX() + x, fromBlock.getY(), fromBlock.getZ() + z);
|
trail_pos = new Location(event.getPlayer().getWorld(), fromBlock.getX() + x, fromBlock.getY(), fromBlock.getZ() + z);
|
||||||
if (trailPlayers.contains(event.getPlayer().getName())) {
|
if (trailPlayers.contains(event.getPlayer().getName()))
|
||||||
|
{
|
||||||
plugin.cpb.getCoreProtectAPI().logPlacement(event.getPlayer().getName(), trail_pos, material, data);
|
plugin.cpb.getCoreProtectAPI().logPlacement(event.getPlayer().getName(), trail_pos, material, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,10 +9,10 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
|
||||||
import org.bukkit.event.player.PlayerArmorStandManipulateEvent;
|
|
||||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||||
|
import org.bukkit.event.player.PlayerArmorStandManipulateEvent;
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -21,7 +21,7 @@ public class MasterBuilderWorldRestrictions extends FreedomService
|
|||||||
{
|
{
|
||||||
|
|
||||||
private final List<String> BLOCKED_WORLDEDIT_COMMANDS = Arrays.asList(
|
private final List<String> BLOCKED_WORLDEDIT_COMMANDS = Arrays.asList(
|
||||||
"green", "fixlava", "fixwater", "br", "brush", "tool", "mat", "range", "cs");
|
"green", "fixlava", "fixwater", "br", "brush", "tool", "mat", "range", "cs", "up", "fill", "setblock");
|
||||||
|
|
||||||
public MasterBuilderWorldRestrictions(TotalFreedomMod plugin)
|
public MasterBuilderWorldRestrictions(TotalFreedomMod plugin)
|
||||||
{
|
{
|
||||||
@ -124,6 +124,7 @@ public class MasterBuilderWorldRestrictions extends FreedomService
|
|||||||
if (plugin.al.isAdmin(player) && !plugin.al.isSeniorAdmin(player) && message.startsWith("/co"))
|
if (plugin.al.isAdmin(player) && !plugin.al.isSeniorAdmin(player) && message.startsWith("/co"))
|
||||||
{
|
{
|
||||||
player.sendMessage(ChatColor.RED + "Only Senior Admins are allowed to use CoreProtect in the Master Builder world.");
|
player.sendMessage(ChatColor.RED + "Only Senior Admins are allowed to use CoreProtect in the Master Builder world.");
|
||||||
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ public class FUtil
|
|||||||
|
|
||||||
public static boolean isExecutive(String name)
|
public static boolean isExecutive(String name)
|
||||||
{
|
{
|
||||||
return (ConfigEntry.SERVER_OWNERS.getList().contains(name) || ConfigEntry.SERVER_EXECUTIVES.getList().contains(name));
|
return ConfigEntry.SERVER_OWNERS.getStringList().contains(name) || ConfigEntry.SERVER_EXECUTIVES.getStringList().contains(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void bcastMsg(String message, ChatColor color)
|
public static void bcastMsg(String message, ChatColor color)
|
||||||
|
Loading…
Reference in New Issue
Block a user