mount stuff is fixed

This commit is contained in:
Cheese 2015-12-09 08:19:55 +11:00
parent 2decc049c5
commit fba88ec231
2 changed files with 51 additions and 49 deletions

View File

@ -75,7 +75,7 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
if (event.getRightClicked() == null) if (event.getRightClicked() == null)
return; return;
SingleEntityMountData<Minecart> mount = GetActive().get(event.getPlayer()); SingleEntityMountData<Minecart> mount = getMountData(event.getRightClicked());
if(mount == null) return; if(mount == null) return;

View File

@ -78,11 +78,13 @@ public class MountSlime extends Mount<SingleEntityMountData<Slime>>
if (event.getRightClicked() == null) if (event.getRightClicked() == null)
return; return;
if (!GetActive().containsKey(event.getPlayer())) SingleEntityMountData<Slime> data = GetActive().get(event.getPlayer());
return;
if(!GetActive().get(event.getPlayer()).ownsMount(event.getPlayer())) if(data == null) return;
return;
if(!data.ownsMount(event.getPlayer())) return;
if(!data.isPartOfMount(event.getRightClicked())) return;
event.getPlayer().leaveVehicle(); event.getPlayer().leaveVehicle();
event.getPlayer().eject(); event.getPlayer().eject();