-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I could be incredibly wrong, as i have not coded since my ap computer science class in freshman year of high school, but entityCanBeTeleported boolean never actually checks if getAllowMinecarts ends up being true.
i feel like this is a simple fix where you just add
if(plugin.getAllowMinecarts() == false && entity instanceof Minecart)
return false;
but i could totally be wrong.
going above and beyond, having specific reasons why something didnt teleport would be nice. eg. starting at line 329 of EntityListener including the proposed fix:
if(plugin.getAllowMobs() == false && entity instanceof Mob)
player.sendMessage(ChatColor.RED + "Serverwide, players are not allowed to teleport a mob. Contact a Moderator if you believe this to be a mistake.");
return false;
if(plugin.getAllowItems() == false && entity instanceof Item)
player.sendMessage(ChatColor.RED + "Serverwide, players are not allowed to teleport an item(s). Contact a Moderator if you believe this to be a mistake.");
return false;
if(plugin.getAllowMinecarts() == false && entity instanceof Minecart)
player.sendMessage(ChatColor.RED + "Serverwide, players are not allowed to teleport a minecart. Contact a Moderator if you believe this to be a mistake.");
return false;
Metadata
Metadata
Assignees
Labels
No labels