SteamWar/BauSystem2.0
Archiviert
12
0

Fix DesignEndStone
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-04-29 14:19:05 +02:00
Ursprung a767a942fb
Commit c3838138b4
3 geänderte Dateien mit 9 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -165,6 +165,8 @@ COUNTINGWAND_MESSAGE_DIMENSION = §e{0}§8, §e{1}§8, §e{2}
# Design Endstone # Design Endstone
DESIGN_ENDSTONE_COMMAND_HELP = §8/§edesign endstone §8- §7Show where Endstone is DESIGN_ENDSTONE_COMMAND_HELP = §8/§edesign endstone §8- §7Show where Endstone is
DESIGN_ENDSTONE_REGION_ERROR = §cThis region has no build area DESIGN_ENDSTONE_REGION_ERROR = §cThis region has no build area
DESIGN_ENDSTONE_ENABLE = §aEndstone is activated
DESIGN_ENDSTONE_DISABLE = §cEndstone is deactivated
# Detonator # Detonator
DETONATOR_LOC_REMOVE = §e{0} removed DETONATOR_LOC_REMOVE = §e{0} removed

Datei anzeigen

@ -160,6 +160,8 @@ COUNTINGWAND_MESSAGE_DIMENSION = §e{0}§8, §e{1}§8, §e{2}
# Design Endstone # Design Endstone
DESIGN_ENDSTONE_COMMAND_HELP = §8/§edesign endstone §8- §7Zeige wo Endstone ist DESIGN_ENDSTONE_COMMAND_HELP = §8/§edesign endstone §8- §7Zeige wo Endstone ist
DESIGN_ENDSTONE_REGION_ERROR = §cDiese Region hat keinen Baubereich DESIGN_ENDSTONE_REGION_ERROR = §cDiese Region hat keinen Baubereich
DESIGN_ENDSTONE_ENABLE = §aEndstone ist aktiviert
DESIGN_ENDSTONE_DISABLE = §cEndstone ist deaktiviert
# Detonator # Detonator
DETONATOR_LOC_REMOVE = §e{0} entfernt DETONATOR_LOC_REMOVE = §e{0} entfernt

Datei anzeigen

@ -19,10 +19,12 @@
package de.steamwar.bausystem.features.design.endstone; package de.steamwar.bausystem.features.design.endstone;
import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.Region;
import de.steamwar.entity.REntity; import de.steamwar.entity.REntity;
import de.steamwar.entity.REntityServer; import de.steamwar.entity.REntityServer;
import de.steamwar.entity.RFallingBlockEntity; import de.steamwar.entity.RFallingBlockEntity;
import net.md_5.bungee.api.ChatMessageType;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
@ -78,7 +80,7 @@ public class DesignEndStone {
if (material == Material.END_STONE || material == Material.END_STONE_BRICKS || material == Material.END_STONE_BRICK_SLAB || material == Material.END_STONE_BRICK_STAIRS || material == Material.END_STONE_BRICK_WALL) { if (material == Material.END_STONE || material == Material.END_STONE_BRICKS || material == Material.END_STONE_BRICK_SLAB || material == Material.END_STONE_BRICK_STAIRS || material == Material.END_STONE_BRICK_WALL) {
Location location = new Location(WORLD, cx + 0.5, cy, cz + 0.5); Location location = new Location(WORLD, cx + 0.5, cy, cz + 0.5);
if (locations.contains(location)) break; if (locations.contains(location)) break;
RFallingBlockEntity entity = new RFallingBlockEntity(entityServer, location, Material.END_STONE); RFallingBlockEntity entity = new RFallingBlockEntity(entityServer, location, Material.RED_STAINED_GLASS);
entity.setNoGravity(true); entity.setNoGravity(true);
entity.setGlowing(true); entity.setGlowing(true);
entities.add(entity); entities.add(entity);
@ -96,10 +98,12 @@ public class DesignEndStone {
if (players.contains(player)) { if (players.contains(player)) {
players.remove(player); players.remove(player);
entityServer.removePlayer(player); entityServer.removePlayer(player);
BauSystem.MESSAGE.send("DESIGN_ENDSTONE_DISABLE", player, ChatMessageType.ACTION_BAR);
} else { } else {
players.add(player); players.add(player);
entityServer.addPlayer(player); entityServer.addPlayer(player);
calc(); calc();
BauSystem.MESSAGE.send("DESIGN_ENDSTONE_ENABLE", player, ChatMessageType.ACTION_BAR);
} }
} }
} }