SteamWar/BauSystem
Archiviert
13
0

Fixing Loader String Double Activation

Dieser Commit ist enthalten in:
Chaoscaot 2021-01-05 16:44:40 +01:00
Ursprung b6b92c4be9
Commit 7e9fb81faa

Datei anzeigen

@ -165,29 +165,25 @@ public class AutoLoader extends IAutoLoader implements Listener {
if (event.getPlayer().isSneaking()) if (event.getPlayer().isSneaking())
return; return;
if(!setup || !event.getPlayer().equals(player)) if (!setup || !event.getPlayer().equals(player))
return; return;
Detoloader detoloader = VersionedCallable.call( Detoloader detoloader = VersionedCallable.call(
new VersionedCallable<>(() -> new VersionedCallable<>(() -> AutoLoader_12.onPlayerInteractLoader(event), 12),
AutoLoader_12.onPlayerInteractLoader(event), 12), new VersionedCallable<>(() -> AutoLoader_15.onPlayerInteractLoader(event), 15));
new VersionedCallable<>(() ->
AutoLoader_15.onPlayerInteractLoader(event), 15));
if(detoloader == null || detoloader.getActivation() < 0) if (detoloader == null || detoloader.getActivation() < 0) return;
return;
if(lastLocation != null && lastLocation.distance(event.getClickedBlock().getLocation()) <= 1) { if (lastLocation != null && lastLocation.distance(event.getClickedBlock().getLocation()) <= 1) return;
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()
, detoloader.isActive()); , detoloader.isActive());
else } else {
new IAutoLoader.TemporaryActivation(this, event.getClickedBlock().getLocation() new IAutoLoader.TemporaryActivation(this, event.getClickedBlock().getLocation()
, detoloader.getActivation()); , detoloader.getActivation());
}
print(detoloader.addBack ? "§e" + detoloader.getBlock() + " betätigt" : print(detoloader.addBack ? "§e" + detoloader.getBlock() + " betätigt" :
detoloader.getBlock(), detoloader.addBack); detoloader.getBlock(), detoloader.addBack);
lastLocation = event.getClickedBlock().getLocation(); lastLocation = event.getClickedBlock().getLocation();