Skip to content

Commit

Permalink
Fix controllable order for NMS#mount
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Mar 12, 2016
1 parent 3c01c43 commit fb2936b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/net/citizensnpcs/trait/Controllable.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private void enterOrLeaveVehicle(Player player) {
if (ownerRequired && !npc.getTrait(Owner.class).isOwnedBy(handle.getBukkitEntity())) {
return;
}
NMS.mount(player, npc.getEntity());
NMS.mount(npc.getEntity(), player);
}

private net.minecraft.server.v1_9_R1.Entity getHandle() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/citizensnpcs/util/NMS.java
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ public static float modifiedSpeed(float baseSpeed, NPC npc) {
public static void mount(org.bukkit.entity.Entity entity, org.bukkit.entity.Entity passenger) {
if (NMS.getHandle(passenger) == null)
return;
NMS.getHandle(entity).startRiding(NMS.getHandle(passenger));
NMS.getHandle(passenger).startRiding(NMS.getHandle(entity));
}

public static void openHorseScreen(Horse horse, Player equipper) {
Expand Down

0 comments on commit fb2936b

Please sign in to comment.