Even more bug fixes (#94)

- Clean up /commandlist
- /ov now displays proper unknown command message
- /toggle doesnt check for case
- Trailer will now check if CoreProtect is enabled before trying to log
- Temporarily disable master builder world restrictions, causing spam in console everytime a command is one
This commit is contained in:
Telesphoreo
2018-07-25 15:09:35 -07:00
committed by Seth
parent 0d0ad7d947
commit 25aa28194b
5 changed files with 24 additions and 25 deletions

View File

@ -48,10 +48,10 @@ public class Trailer extends FreedomService
return;
}
if (event.getPlayer().getWorld().equals(plugin.wm.masterBuilderWorld.getWorld()))
{
return;
}
//if (event.getPlayer().getWorld().equals(plugin.wm.masterBuilderWorld.getWorld()))
//{
// return;
//}
Block fromBlock = event.getFrom().getBlock();
if (!fromBlock.isEmpty())
@ -65,7 +65,6 @@ public class Trailer extends FreedomService
return;
}
final Location location = fromBlock.getLocation();
fromBlock.setType(MaterialGroup.WOOL_COLORS.get(random.nextInt(MaterialGroup.WOOL_COLORS.size())));
byte data = DepreciationAggregator.getData_Block(fromBlock);
Material material = Material.getMaterial(String.valueOf(fromBlock.getType()));
@ -75,7 +74,7 @@ public class Trailer extends FreedomService
{
final Location trail_pos;
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.isEnabled())
{
plugin.cpb.getCoreProtectAPI().logPlacement(event.getPlayer().getName(), trail_pos, material, data);
}