only in world

This commit is contained in:
okx-code
2024-11-05 20:15:32 +00:00
parent 605ed5e371
commit fd768a49f9
4 changed files with 10 additions and 0 deletions

View File

@@ -622,3 +622,4 @@ hacks:
PortalConnect:
enabled: false
server: main
world: world

View File

@@ -608,3 +608,4 @@ hacks:
PortalConnect:
enabled: true
server: main
world: world

View File

@@ -34,6 +34,9 @@ public class PortalConnect extends BasicHack {
@AutoLoad
private String server;
@AutoLoad
private String world;
private final Map<UUID, Long> onCooldown = new HashMap<>();
public PortalConnect(SimpleAdminHacks plugin, BasicHackConfig config) {
@@ -54,6 +57,10 @@ public class PortalConnect extends BasicHack {
if (event.getBlock().getType() != Material.END_PORTAL) {
return;
}
if (!event.getBlock().getWorld().getName().equals(world)) {
return;
}
event.setCancelled(true);
if (onCooldown.containsKey(player.getUniqueId())) {

View File

@@ -560,3 +560,4 @@ hacks:
PortalConnect:
enabled: false
server: main
world: world