forked from SteamWar/SteamWar
Merge pull request 'bausystem/TLS' (#184) from bausystem/TLS into main
Reviewed-on: SteamWar/SteamWar#184 Reviewed-by: YoyoNow <yoyonow@noreply.localhost>
This commit is contained in:
@@ -1030,6 +1030,7 @@ SCHEMATIC_GUI_ITEM=§eSchematics
|
||||
# TNTListener
|
||||
TLS_MESSAGE_79=§7TLS§8> §7Tick §e{0} §8- §7TNT §e{1}
|
||||
TLS_MESSAGE_80=§7TLS§8> §7Tick §e{0} §8- §7TNT §e{1} §8(§e{2} §7with Fuse 80§8)
|
||||
TLS_START_HELP=§8/§etls start §8: §7Start the TNT Listener
|
||||
TLS_STOP_HELP=§8/§etls stop §8: §7Stop the TNT Listener
|
||||
TLS_SCOREBOARD_ELEMENT=§eTLS§8: §aon
|
||||
TLS_START_HELP=§8/§etls start §8- §7Start the TNT Listener
|
||||
TLS_STOP_HELP=§8/§etls stop §8- §7Stop the TNT Listener
|
||||
TLS_SCOREBOARD_ELEMENT=§eTLS§8: §aon
|
||||
TLS_TOGGLE_HELP=§8/§etls§8: §7Toggle the TNT Listener
|
||||
@@ -961,6 +961,7 @@ TYPEREPLACE_HELP=§8//§etyreplace §8[§7type§8] §8[§7type§8] §8- §7Erset
|
||||
# Schematics
|
||||
SCHEMATIC_GUI_ITEM=§eSchematics
|
||||
TLS_MESSAGE_80=§7TLS§8> §7Tick §e{0} §8- §7TNT §e{1} §8(§e{2} §7mit Fuse 80§8)
|
||||
TLS_START_HELP=§8/§etls start §8: §7Starte den TNT Listener
|
||||
TLS_STOP_HELP=§8/§etls stop §8: §7Stope den TNT Listener
|
||||
TLS_SCOREBOARD_ELEMENT=§eTLS§8: §aan
|
||||
TLS_START_HELP=§8/§etls start §8- §7Starte den TNT Listener
|
||||
TLS_STOP_HELP=§8/§etls stop §8- §7Stope den TNT Listener
|
||||
TLS_SCOREBOARD_ELEMENT=§eTLS§8: §aan
|
||||
TLS_TOGGLE_HELP=§8/§etls §8: §7Toggle den TNT Listener
|
||||
+12
-23
@@ -72,6 +72,14 @@ public class TestblockCommand extends SWCommand {
|
||||
resetRegion(p, node, isExtension ? RegionExtensionType.EXTENSION : RegionExtensionType.NORMAL, isIgnoreAir, isOnlyColor, replaceTNT, replaceWater);
|
||||
}
|
||||
|
||||
@Register(value="default")
|
||||
public void setTestblockDefault(Player p) {
|
||||
Region region = regionCheck(p);
|
||||
if (region == null) return;
|
||||
region.getRegionData().setTestblockSchematic(null);
|
||||
resetRegion(p, null, RegionExtensionType.EXTENSION, false, false, false, false);
|
||||
}
|
||||
|
||||
private void resetRegion(Player p, SchematicNode node, RegionExtensionType regionExtensionType, boolean ignoreAir, boolean onlyColors, boolean removeTNT, boolean removeWater) {
|
||||
Region region = regionCheck(p);
|
||||
if (region == null) return;
|
||||
@@ -92,29 +100,10 @@ public class TestblockCommand extends SWCommand {
|
||||
}
|
||||
}
|
||||
|
||||
// Beta Tester enabled
|
||||
switch (BauServer.getInstance().getOwnerID()) {
|
||||
case 245:
|
||||
case 403:
|
||||
case 1898:
|
||||
case 3320:
|
||||
case 4603:
|
||||
case 5262:
|
||||
case 5399:
|
||||
case 6032:
|
||||
case 7862:
|
||||
case 11077:
|
||||
case 11888:
|
||||
case 12258:
|
||||
case 16009:
|
||||
if (node == null) {
|
||||
node = region.getRegionData().getTestblockSchematic();
|
||||
} else {
|
||||
region.getRegionData().setTestblockSchematic(node);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (node == null) {
|
||||
node = region.getRegionData().getTestblockSchematic();
|
||||
} else {
|
||||
region.getRegionData().setTestblockSchematic(node);
|
||||
}
|
||||
|
||||
PasteBuilder.ClipboardProvider clipboardProvider;
|
||||
|
||||
+10
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.tntlistener;
|
||||
package de.steamwar.bausystem.features.tls;
|
||||
|
||||
import de.steamwar.command.SWCommand;
|
||||
import de.steamwar.linkage.Linked;
|
||||
@@ -43,4 +43,13 @@ public class TLSCommand extends SWCommand {
|
||||
public void stop(@Validator Player player) {
|
||||
listener.stopListening(player);
|
||||
}
|
||||
|
||||
@Register(description = "TLS_TOGGLE_HELP")
|
||||
public void toggle(@Validator Player player) {
|
||||
if (listener.isActiveFor(player)) {
|
||||
listener.stopListening(player);
|
||||
} else {
|
||||
listener.startListening(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.tntlistener;
|
||||
package de.steamwar.bausystem.features.tls;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.features.tpslimit.TPSUtils;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.tntlistener;
|
||||
package de.steamwar.bausystem.features.tls;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.Permission;
|
||||
Reference in New Issue
Block a user