SteamWar/MissileWars
Archiviert
13
0

Update ItemListener
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-02-01 11:42:34 +01:00
Ursprung 4ef9bd1fb7
Commit 95ccb0598c

Datei anzeigen

@ -46,14 +46,12 @@ public class ItemListener extends BasicListener {
if (e.getAction() != Action.RIGHT_CLICK_BLOCK && e.getAction() != Action.RIGHT_CLICK_AIR) if (e.getAction() != Action.RIGHT_CLICK_BLOCK && e.getAction() != Action.RIGHT_CLICK_AIR)
return; return;
if (SpecialItem.handleUse(item, e.getPlayer())){ if (SpecialItem.handleUse(item, e.getPlayer()) && item.getType() != Material.SPLASH_POTION) {
item.setAmount(item.getAmount()-1); item.setAmount(item.getAmount()-1);
e.getPlayer().updateInventory(); e.getPlayer().updateInventory();
if (item.getType() != Material.SPLASH_POTION) {
e.setCancelled(true); e.setCancelled(true);
} }
} }
}
@EventHandler @EventHandler
public void onThrow(ProjectileLaunchEvent e) { public void onThrow(ProjectileLaunchEvent e) {