Skip to content

Commit

Permalink
Added Option to disable portals
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachesMLG committed Feb 24, 2024
1 parent 92984d1 commit 37d1445
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ public Configuration() {
public int powerRecoveryDelayInSeconds = 600;
public double powerRecoveryAmount = 1;

public boolean disablePortals = true;

public char[] mapChars = "\\/#$%=&^ABCDEFGHJKLMNOPQRSTUVWXYZ1234567890abcdeghjmnopqrsuvwxyz?".toCharArray();
public String mapTitle = "&8[ &c(%chunk_x%, %chunk_z%) %faction% &8]";
public String mapTitleFiller = "&8&m ";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.iridium.iridiumfactions.listeners;

import com.iridium.iridiumfactions.IridiumFactions;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerPortalEvent;
Expand All @@ -8,6 +9,8 @@ public class PlayerPortalListener implements Listener {

@EventHandler(ignoreCancelled = true)
public void onPlayerPortal(PlayerPortalEvent event) {
//TODO stop people portaling into different bases?
if (IridiumFactions.getInstance().getConfiguration().disablePortals) {
event.setCancelled(true);
}
}
}

0 comments on commit 37d1445

Please sign in to comment.