VS now ops players, more security measures for MBW

This commit is contained in:
ZeroEpoch1969 2018-07-12 15:25:18 -07:00
parent 8602850245
commit f167134a3a
No known key found for this signature in database
GPG Key ID: E0AAB104FB9F8FDF
3 changed files with 16 additions and 8 deletions

View File

@ -3,17 +3,13 @@ package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService; import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod; import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry; import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import org.bukkit.entity.Bat; import org.bukkit.attribute.Attributable;
import org.bukkit.entity.EnderDragon; import org.bukkit.attribute.Attribute;
import org.bukkit.entity.Entity; import org.bukkit.entity.*;
import org.bukkit.entity.Ghast;
import org.bukkit.entity.Giant;
import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.Slime;
import org.bukkit.entity.Wither;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.CreatureSpawnEvent; import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.EntitySpawnEvent;
public class MobBlocker extends FreedomService public class MobBlocker extends FreedomService
{ {

View File

@ -132,6 +132,8 @@ public class Command_verify extends FreedomCommand
{ {
plugin.rm.updateDisplay(playerSender); plugin.rm.updateDisplay(playerSender);
} }
playerSender.setOp(true);
msg(YOU_ARE_OP);
final FPlayer fPlayer = plugin.pl.getPlayer(playerSender); final FPlayer fPlayer = plugin.pl.getPlayer(playerSender);
if (fPlayer.getFreezeData().isFrozen()) if (fPlayer.getFreezeData().isFrozen())
{ {

View File

@ -138,6 +138,11 @@ public class ItemFun extends FreedomService
break; break;
} }
if (player.getWorld().equals(plugin.wm.masterBuilderWorld.getWorld()) && plugin.mbwr.doRestrict(player))
{
break;
}
Location location = player.getLocation().clone(); Location location = player.getLocation().clone();
Vector playerPostion = location.toVector().add(new Vector(0.0, 1.65, 0.0)); Vector playerPostion = location.toVector().add(new Vector(0.0, 1.65, 0.0));
@ -241,6 +246,11 @@ public class ItemFun extends FreedomService
break; break;
} }
if (player.getWorld().equals(plugin.wm.masterBuilderWorld.getWorld()) && plugin.mbwr.doRestrict(player))
{
break;
}
event.setCancelled(true); event.setCancelled(true);
Block targetBlock; Block targetBlock;