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)
return;
SingleEntityMountData<Minecart> mount = GetActive().get(event.getPlayer());
SingleEntityMountData<Minecart> mount = getMountData(event.getRightClicked());
if(mount == null) return;

View File

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