-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
How to reproduce:
Right-click a block without holding anything
Fix:
Simply changing the method from
@EventHandler
public void onplayerInteract(PlayerInteractEvent event){
if(event.getAction() == Action.RIGHT_CLICK_BLOCK){
if(event.getItem().getTypeId() == Material.STICK.getId()){
Location l = event.getClickedBlock().getLocation().add(0, 1, 0);
RpgEntities.em.spawnRpgEntity(l, EntityType.WOLF);
}
}
}
To this
@EventHandler
public void onplayerInteract(PlayerInteractEvent event){
if(event.getAction() == Action.RIGHT_CLICK_BLOCK){
if(event.getItem() != null && event.getItem().getTypeId() == Material.STICK.getId()){
Location l = event.getClickedBlock().getLocation().add(0, 1, 0);
RpgEntities.em.spawnRpgEntity(l, EntityType.WOLF);
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels