SteamWar/BauSystem
Archiviert
13
0

Fixed Autloader #96

Manuell gemergt
Lixfel hat 1 Commits von detonator2.0 nach master 2020-09-13 20:05:50 +02:00 zusammengeführt
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -171,7 +171,7 @@ public class AutoLoader extends IAutoLoader implements Listener {
detoloader = AutoLoader_12.onPlayerInteractLoader(event); detoloader = AutoLoader_12.onPlayerInteractLoader(event);
} }
if(detoloader == null) return; if(detoloader == null || detoloader.getActivation() < 0) return;
if(detoloader.useActive) if(detoloader.useActive)
new IAutoLoader.RedstoneActivation(this, event.getClickedBlock().getLocation() new IAutoLoader.RedstoneActivation(this, event.getClickedBlock().getLocation()
, detoloader.getActivation() == 0 ? getLastActivation() : detoloader.getActivation() , detoloader.getActivation() == 0 ? getLastActivation() : detoloader.getActivation()

Datei anzeigen

@ -76,7 +76,6 @@ public class Detonator implements Listener {
} }
public void execute() { public void execute() {
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("§a" + locs.size() + " Punkt(e) ausgelöst!"));
for (Detoloader.DetonatorActivation activation: getLocations()) { for (Detoloader.DetonatorActivation activation: getLocations()) {
Boolean powered; Boolean powered;
@ -100,6 +99,7 @@ public class Detonator implements Listener {
AutoLoader_12.setRedstone(activation.location, false), activation.activation); AutoLoader_12.setRedstone(activation.location, false), activation.activation);
} }
} }
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("§a" + locs.size() + " Punkt" + (locs.size() > 1 ? "e" : "") + " ausgelöst!"));
} }
@EventHandler @EventHandler
@ -157,7 +157,7 @@ public class Detonator implements Listener {
} }
} }
@EventHandler(ignoreCancelled = true) @EventHandler
public void onPlayerQuit(PlayerQuitEvent event) { public void onPlayerQuit(PlayerQuitEvent event) {
deleteDetonator(event.getPlayer()); deleteDetonator(event.getPlayer());
} }