Tracer-entity #147
@ -23,6 +23,7 @@ package de.steamwar.bausystem.tracer.show.mode;
|
||||
|
||||
import de.steamwar.bausystem.tracer.*;
|
||||
import de.steamwar.core.Core;
|
||||
import de.steamwar.core.VersionedCallable;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -60,30 +61,16 @@ public class Advanced extends Basic {
|
||||
if (updateEntityMap.containsKey(updatePointPosition)) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (Core.getVersion()) {
|
||||
case 12:
|
||||
updateEntityMap.put(updatePointPosition, TNTTracer_12.createUpdatePoint(player.getWorld(), new TNTPosition(updatePointY).getLocation(), player));
|
||||
break;
|
||||
default:
|
||||
updateEntityMap.put(updatePointPosition, TNTTracer_15.createUpdatePoint(player.getWorld(), new TNTPosition(updatePointY).getLocation(), player));
|
||||
break;
|
||||
}
|
||||
updateEntityMap.put(updatePointPosition, VersionedCallable.call(new VersionedCallable<>(() -> TNTTracer_12.createUpdatePoint(player.getWorld(), updatePointY, player), 8),
|
||||
new VersionedCallable<>(() -> TNTTracer_15.createUpdatePoint(player.getWorld(), updatePointY, player), 14)));
|
||||
}
|
||||
if (!position.getLocation().equals(updatePointXZ)) {
|
||||
RoundedTNTPosition updatePointPosition = new RoundedTNTPosition(updatePointXZ);
|
||||
if (updateEntityMap.containsKey(updatePointPosition)) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (Core.getVersion()) {
|
||||
case 12:
|
||||
updateEntityMap.put(updatePointPosition, TNTTracer_12.createUpdatePoint(player.getWorld(), new TNTPosition(updatePointXZ).getLocation(), player));
|
||||
break;
|
||||
default:
|
||||
updateEntityMap.put(updatePointPosition, TNTTracer_15.createUpdatePoint(player.getWorld(), new TNTPosition(updatePointXZ).getLocation(), player));
|
||||
break;
|
||||
}
|
||||
updateEntityMap.put(updatePointPosition, VersionedCallable.call(new VersionedCallable<>(() -> TNTTracer_12.createUpdatePoint(player.getWorld(), updatePointXZ, player), 8),
|
||||
new VersionedCallable<>(() -> TNTTracer_15.createUpdatePoint(player.getWorld(), updatePointXZ, player), 14)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package de.steamwar.bausystem.tracer.show.mode;
|
||||
import de.steamwar.bausystem.tracer.*;
|
||||
import de.steamwar.bausystem.tracer.show.ShowMode;
|
||||
import de.steamwar.core.Core;
|
||||
import de.steamwar.core.VersionedCallable;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.HashMap;
|
||||
@ -24,15 +25,8 @@ public class Basic implements ShowMode {
|
||||
if (tntEntityMap.containsKey(roundedTNTPosition)) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (Core.getVersion()) {
|
||||
case 12:
|
||||
tntEntityMap.put(roundedTNTPosition, TNTTracer_12.createTNT(player.getWorld(), position.getLocation(), player, position.isExploded()));
|
||||
break;
|
||||
default:
|
||||
tntEntityMap.put(roundedTNTPosition, TNTTracer_15.createTNT(player.getWorld(), position.getLocation(), player, position.isExploded()));
|
||||
break;
|
||||
}
|
||||
tntEntityMap.put(roundedTNTPosition, VersionedCallable.call(new VersionedCallable<>(() -> TNTTracer_12.createTNT(player.getWorld(), position.getLocation(), player, position.isExploded()), 8),
|
||||
new VersionedCallable<>(() -> TNTTracer_15.createTNT(player.getWorld(), position.getLocation(), player, position.isExploded()), 14)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren