Merge pull request 'Fixed Issue #110 Loader bugt bei Strings' (#173) from psilab into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #173 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
3abeffd8b3
@ -38,6 +38,7 @@ import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
import java.util.*;
|
||||
@ -201,8 +202,18 @@ public class Loader implements Listener {
|
||||
|
||||
if (event.getAction() != Action.RIGHT_CLICK_BLOCK && event.getAction() != Action.PHYSICAL)
|
||||
return;
|
||||
|
||||
if (event.getClickedBlock().getType() == Material.OBSERVER)
|
||||
return;
|
||||
|
||||
if (event.getHand() == EquipmentSlot.OFF_HAND) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getPlayer().getInventory().getItemInMainHand().getType() == Material.TNT) {
|
||||
return;
|
||||
}
|
||||
|
||||
LoaderButton button = LoaderButton.fromBlock(event.getClickedBlock());
|
||||
if (button != LoaderButton.INVALID) {
|
||||
actions.add(InteractionActivation.construct(p, event.getClickedBlock().getLocation(), this));
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren