mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
only in world
This commit is contained in:
@@ -622,3 +622,4 @@ hacks:
|
||||
PortalConnect:
|
||||
enabled: false
|
||||
server: main
|
||||
world: world
|
||||
|
||||
@@ -608,3 +608,4 @@ hacks:
|
||||
PortalConnect:
|
||||
enabled: true
|
||||
server: main
|
||||
world: world
|
||||
|
||||
@@ -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())) {
|
||||
|
||||
@@ -560,3 +560,4 @@ hacks:
|
||||
PortalConnect:
|
||||
enabled: false
|
||||
server: main
|
||||
world: world
|
||||
|
||||
Reference in New Issue
Block a user