diff --git a/BauSystem_12/src/de/steamwar/bausystem/tracer/TNTEntityFactory_12.java b/BauSystem_12/src/de/steamwar/bausystem/tracer/TNTEntityFactory_12.java
new file mode 100644
index 0000000..794fbc4
--- /dev/null
+++ b/BauSystem_12/src/de/steamwar/bausystem/tracer/TNTEntityFactory_12.java
@@ -0,0 +1,31 @@
+/*
+ This file is a part of the SteamWar software.
+
+ Copyright (C) 2020 SteamWar.de-Serverteam
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+package de.steamwar.bausystem.tracer;
+
+import org.bukkit.World;
+import org.bukkit.entity.Player;
+
+public class TNTEntityFactory_12 {
+
+ public static AbstractTNTEntity create(World world, TNTPosition tntPosition, Player player) {
+ return new TNTEntity_12(world, tntPosition, player);
+ }
+
+}
diff --git a/BauSystem_12/src/de/steamwar/bausystem/tracer/TNTEntity_12.java b/BauSystem_12/src/de/steamwar/bausystem/tracer/TNTEntity_12.java
index edfb52f..1412fad 100644
--- a/BauSystem_12/src/de/steamwar/bausystem/tracer/TNTEntity_12.java
+++ b/BauSystem_12/src/de/steamwar/bausystem/tracer/TNTEntity_12.java
@@ -1,3 +1,22 @@
+/*
+ This file is a part of the SteamWar software.
+
+ Copyright (C) 2020 SteamWar.de-Serverteam
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
package de.steamwar.bausystem.tracer;
import net.minecraft.server.v1_12_R1.*;
@@ -6,7 +25,7 @@ import org.bukkit.craftbukkit.v1_12_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
-public class TNTEntity_12 extends EntityFallingBlock implements AbstractTNTEntity {
+class TNTEntity_12 extends EntityFallingBlock implements AbstractTNTEntity {
private TNTPosition position;
@@ -49,6 +68,9 @@ public class TNTEntity_12 extends EntityFallingBlock implements AbstractTNTEntit
@Override
public AbstractTNTEntity hide(Player player) {
+ PacketPlayOutEntityDestroy packetPlayOutEntityDestroy = new PacketPlayOutEntityDestroy(getId());
+ ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packetPlayOutEntityDestroy);
+
return this;
}
@@ -56,4 +78,5 @@ public class TNTEntity_12 extends EntityFallingBlock implements AbstractTNTEntit
public void remove() {
killEntity();
}
+
}
diff --git a/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTEntityFactory_15.java b/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTEntityFactory_15.java
new file mode 100644
index 0000000..0fc1ac8
--- /dev/null
+++ b/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTEntityFactory_15.java
@@ -0,0 +1,31 @@
+/*
+ This file is a part of the SteamWar software.
+
+ Copyright (C) 2020 SteamWar.de-Serverteam
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+package de.steamwar.bausystem.tracer;
+
+import org.bukkit.World;
+import org.bukkit.entity.Player;
+
+public class TNTEntityFactory_15 {
+
+ public static AbstractTNTEntity create(World world, TNTPosition tntPosition, Player player) {
+ return new TNTEntity_15(world, tntPosition, player);
+ }
+
+}
diff --git a/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTEntity_15.java b/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTEntity_15.java
index 6a49013..f53c11d 100644
--- a/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTEntity_15.java
+++ b/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTEntity_15.java
@@ -1,3 +1,22 @@
+/*
+ This file is a part of the SteamWar software.
+
+ Copyright (C) 2020 SteamWar.de-Serverteam
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
package de.steamwar.bausystem.tracer;
import net.minecraft.server.v1_15_R1.*;
@@ -6,7 +25,7 @@ import org.bukkit.craftbukkit.v1_15_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
-public class TNTEntity_15 extends EntityFallingBlock implements AbstractTNTEntity {
+class TNTEntity_15 extends EntityFallingBlock implements AbstractTNTEntity {
private static final Vec3D ZERO = new Vec3D(0, 0, 0);
private TNTPosition position;
diff --git a/BauSystem_API/src/de/steamwar/bausystem/tracer/AbstractTNTEntity.java b/BauSystem_API/src/de/steamwar/bausystem/tracer/AbstractTNTEntity.java
index 89c7dd3..d39751f 100644
--- a/BauSystem_API/src/de/steamwar/bausystem/tracer/AbstractTNTEntity.java
+++ b/BauSystem_API/src/de/steamwar/bausystem/tracer/AbstractTNTEntity.java
@@ -1,3 +1,22 @@
+/*
+ This file is a part of the SteamWar software.
+
+ Copyright (C) 2020 SteamWar.de-Serverteam
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
package de.steamwar.bausystem.tracer;
import org.bukkit.entity.Player;
diff --git a/BauSystem_API/src/de/steamwar/bausystem/tracer/ReflectionUtils.java b/BauSystem_API/src/de/steamwar/bausystem/tracer/ReflectionUtils.java
index 5fc0946..0aac017 100644
--- a/BauSystem_API/src/de/steamwar/bausystem/tracer/ReflectionUtils.java
+++ b/BauSystem_API/src/de/steamwar/bausystem/tracer/ReflectionUtils.java
@@ -1,3 +1,22 @@
+/*
+ This file is a part of the SteamWar software.
+
+ Copyright (C) 2020 SteamWar.de-Serverteam
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
package de.steamwar.bausystem.tracer;
import java.lang.reflect.Field;
diff --git a/BauSystem_API/src/de/steamwar/bausystem/tracer/TNTPosition.java b/BauSystem_API/src/de/steamwar/bausystem/tracer/TNTPosition.java
index 2a65f6c..12708e6 100644
--- a/BauSystem_API/src/de/steamwar/bausystem/tracer/TNTPosition.java
+++ b/BauSystem_API/src/de/steamwar/bausystem/tracer/TNTPosition.java
@@ -1,3 +1,22 @@
+/*
+ This file is a part of the SteamWar software.
+
+ Copyright (C) 2020 SteamWar.de-Serverteam
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
package de.steamwar.bausystem.tracer;
import org.bukkit.entity.Entity;
diff --git a/BauSystem_Main/src/de/steamwar/bausystem/tracer/show/mode/BasicShowMode.java b/BauSystem_Main/src/de/steamwar/bausystem/tracer/show/mode/BasicShowMode.java
index 85a378e..8819135 100644
--- a/BauSystem_Main/src/de/steamwar/bausystem/tracer/show/mode/BasicShowMode.java
+++ b/BauSystem_Main/src/de/steamwar/bausystem/tracer/show/mode/BasicShowMode.java
@@ -1,9 +1,6 @@
package de.steamwar.bausystem.tracer.show.mode;
-import de.steamwar.bausystem.tracer.AbstractTNTEntity;
-import de.steamwar.bausystem.tracer.TNTEntity_12;
-import de.steamwar.bausystem.tracer.TNTEntity_15;
-import de.steamwar.bausystem.tracer.TNTPosition;
+import de.steamwar.bausystem.tracer.*;
import de.steamwar.bausystem.tracer.show.ShowMode;
import de.steamwar.core.Core;
import org.bukkit.entity.Player;
@@ -25,10 +22,10 @@ public class BasicShowMode implements ShowMode {
public void show(TNTPosition position) {
switch (Core.getVersion()) {
case 12:
- // tntEntitySet.add(new TNTEntity_12(player.getWorld(), position, player));
+ tntEntitySet.add(TNTEntityFactory_12.create(player.getWorld(), position, player));
break;
default:
- tntEntitySet.add(new TNTEntity_15(player.getWorld(), position, player));
+ tntEntitySet.add(TNTEntityFactory_15.create(player.getWorld(), position, player));
break;
}
}