Minor comment and formatting cleanup
This commit is contained in:
		@@ -16,7 +16,6 @@ import java.util.Set;
 | 
			
		||||
 */
 | 
			
		||||
public class LanguageLoader {
 | 
			
		||||
 | 
			
		||||
    // Variables
 | 
			
		||||
    private final String languageFolder;
 | 
			
		||||
    private final Map<String, String> loadedBackupStrings;
 | 
			
		||||
    private String chosenLanguage;
 | 
			
		||||
 
 | 
			
		||||
@@ -73,11 +73,11 @@ public class Stargate extends JavaPlugin {
 | 
			
		||||
    private String dataFolderPath;
 | 
			
		||||
 | 
			
		||||
    public static ChatColor signColor;
 | 
			
		||||
    // Used for debug
 | 
			
		||||
    //Used for debug
 | 
			
		||||
    public static boolean debuggingEnabled = false;
 | 
			
		||||
    public static boolean permissionDebuggingEnabled = false;
 | 
			
		||||
 | 
			
		||||
    // HashMap of player names for Bungee support
 | 
			
		||||
    //HashMap of player names for Bungee support
 | 
			
		||||
    public static final Map<String, String> bungeeQueue = new HashMap<>();
 | 
			
		||||
    //World names that contain stargates
 | 
			
		||||
    public static final HashSet<String> managedWorlds = new HashSet<>();
 | 
			
		||||
@@ -189,7 +189,9 @@ public class Stargate extends JavaPlugin {
 | 
			
		||||
     * @param error   <p>Whether the message sent is an error</p>
 | 
			
		||||
     */
 | 
			
		||||
    private static void sendMessage(CommandSender player, String message, boolean error) {
 | 
			
		||||
        if (message.isEmpty()) return;
 | 
			
		||||
        if (message.isEmpty()) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        //Replace color codes with green? What's the deal with the dollar sign?
 | 
			
		||||
        message = message.replaceAll("(&([a-f0-9]))", "\u00A7$2");
 | 
			
		||||
        if (error) {
 | 
			
		||||
@@ -330,7 +332,7 @@ public class Stargate extends JavaPlugin {
 | 
			
		||||
        this.loadGates();
 | 
			
		||||
        this.loadAllPortals();
 | 
			
		||||
 | 
			
		||||
        // Check to see if Economy is loaded yet.
 | 
			
		||||
        //Check to see if Economy is loaded yet.
 | 
			
		||||
        setupVaultEconomy();
 | 
			
		||||
 | 
			
		||||
        //Run necessary threads
 | 
			
		||||
 
 | 
			
		||||
@@ -6,6 +6,9 @@ import org.bukkit.event.EventHandler;
 | 
			
		||||
import org.bukkit.event.Listener;
 | 
			
		||||
import org.bukkit.event.world.PortalCreateEvent;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Listens for and cancels relevant portal events
 | 
			
		||||
 */
 | 
			
		||||
public class PortalEventListener implements Listener {
 | 
			
		||||
 | 
			
		||||
    @EventHandler
 | 
			
		||||
@@ -13,6 +16,7 @@ public class PortalEventListener implements Listener {
 | 
			
		||||
        if (event.isCancelled()) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        //Cancel nether portal creation when the portal is a StarGate portal
 | 
			
		||||
        for (BlockState block : event.getBlocks()) {
 | 
			
		||||
            if (PortalHandler.getByBlock(block.getBlock()) != null) {
 | 
			
		||||
                event.setCancelled(true);
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@ public class Gate {
 | 
			
		||||
    private final Material portalClosedBlock;
 | 
			
		||||
    private final Material portalButton;
 | 
			
		||||
 | 
			
		||||
    // Economy information
 | 
			
		||||
    //Economy information
 | 
			
		||||
    private final int useCost;
 | 
			
		||||
    private final int createCost;
 | 
			
		||||
    private final int destroyCost;
 | 
			
		||||
 
 | 
			
		||||
@@ -513,7 +513,7 @@ public class Portal {
 | 
			
		||||
    /**
 | 
			
		||||
     * Adjusts the rotation of the player to face out from the portal
 | 
			
		||||
     *
 | 
			
		||||
     * @param exit   <p>The location the player will exit from</p>
 | 
			
		||||
     * @param exit <p>The location the player will exit from</p>
 | 
			
		||||
     */
 | 
			
		||||
    private void adjustRotation(Location exit) {
 | 
			
		||||
        int adjust = 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,8 @@
 | 
			
		||||
package net.knarcraft.stargate.portal;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Each enum value represents one option a portal can have/use
 | 
			
		||||
 */
 | 
			
		||||
public enum PortalOption {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -13,10 +13,10 @@ public class StarGateThread implements Runnable {
 | 
			
		||||
    @Override
 | 
			
		||||
    public void run() {
 | 
			
		||||
        long time = System.currentTimeMillis() / 1000;
 | 
			
		||||
        // Close open portals
 | 
			
		||||
        //Close open portals
 | 
			
		||||
        for (Iterator<Portal> iterator = Stargate.openPortalsQueue.iterator(); iterator.hasNext(); ) {
 | 
			
		||||
            Portal portal = iterator.next();
 | 
			
		||||
            // Skip always open and non-open gates
 | 
			
		||||
            //Skip always open and non-open gates
 | 
			
		||||
            if (portal.getOptions().isAlwaysOn() || !portal.isOpen()) {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
@@ -25,7 +25,7 @@ public class StarGateThread implements Runnable {
 | 
			
		||||
                iterator.remove();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        // Deactivate active portals
 | 
			
		||||
        //Deactivate active portals
 | 
			
		||||
        for (Iterator<Portal> iterator = Stargate.activePortalsQueue.iterator(); iterator.hasNext(); ) {
 | 
			
		||||
            Portal portal = iterator.next();
 | 
			
		||||
            if (!portal.isActive()) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user