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