commit 9f8579ccd74178430ea77ffba3ace8dc7ae1b756 parent 7c1b2681b3814c33f7bb6a3b953a84e85655b1a0 Author: chunksize <reisingerluca@gmail.com> Date: Sat, 4 Feb 2023 01:29:44 +0100 Added head saddle feature Diffstat:
M | src/poppy/modules/CommonModule.java | | | 10 | ++++++++++ |
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/poppy/modules/CommonModule.java b/src/poppy/modules/CommonModule.java @@ -159,6 +159,16 @@ public class CommonModule implements Listener event.setCancelled(true); } } + + if(event.getRightClicked().getType().equals(EntityType.PLAYER)) + { + Player clickedPlayer = (Player) event.getRightClicked(); + + if(clickedPlayer.getInventory().getHelmet().getType().equals(Material.SADDLE)) + { + clickedPlayer.addPassenger(player); + } + } } @EventHandler