Skip to content

Commit

Permalink
Reformat whole code by applying my "ugly" codding style.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Dec 29, 2020
1 parent b9af186 commit 573a246
Show file tree
Hide file tree
Showing 45 changed files with 14,979 additions and 14,755 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package world.bentobox.magiccobblestonegenerator;

import org.bukkit.Bukkit;
import java.util.Optional;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.World;
import java.util.Optional;

import world.bentobox.bentobox.api.addons.Addon;
import world.bentobox.bentobox.api.addons.GameModeAddon;
Expand All @@ -18,8 +18,8 @@
import world.bentobox.magiccobblestonegenerator.commands.player.GeneratorPlayerCommand;
import world.bentobox.magiccobblestonegenerator.config.Settings;
import world.bentobox.magiccobblestonegenerator.database.objects.GeneratorDataObject;
import world.bentobox.magiccobblestonegenerator.listeners.JoinLeaveListener;
import world.bentobox.magiccobblestonegenerator.listeners.IslandLevelListener;
import world.bentobox.magiccobblestonegenerator.listeners.JoinLeaveListener;
import world.bentobox.magiccobblestonegenerator.listeners.VanillaGeneratorListener;
import world.bentobox.magiccobblestonegenerator.managers.StoneGeneratorImportManager;
import world.bentobox.magiccobblestonegenerator.managers.StoneGeneratorManager;
Expand All @@ -29,6 +29,7 @@

/**
* Main addon Class. It starts all processes so addon could properly work.
*
* @author BONNe
*/
public class StoneGeneratorAddon extends Addon
Expand Down Expand Up @@ -118,6 +119,7 @@ private void setupAddon()

/**
* This method hooks this addon into gamemode.
*
* @param gameMode GameModeAddon where need to be hooked.
*/
private void hookIntoGameMode(GameModeAddon gameMode)
Expand Down Expand Up @@ -159,6 +161,7 @@ private void hookIntoGameMode(GameModeAddon gameMode)

/**
* Registers the placeholders
*
* @param addon GameMode addon where placeholders are added.
* @since 2.0.0
*/
Expand Down Expand Up @@ -271,8 +274,8 @@ private void registerPlaceholders(GameModeAddon addon)


/**
* This is silly method that was introduced to reduce main method complexity, and just reports
* if economy is enabled or not.
* This is silly method that was introduced to reduce main method complexity, and just reports if economy is enabled
* or not.
*/
private void findVault()
{
Expand All @@ -293,8 +296,8 @@ private void findVault()


/**
* This is silly method that was introduced to reduce main method complexity, and just reports
* if level addon is enabled or not.
* This is silly method that was introduced to reduce main method complexity, and just reports if level addon is
* enabled or not.
*/
private void findLevel()
{
Expand Down Expand Up @@ -443,6 +446,7 @@ public boolean isVaultProvided()

/**
* This method adds access to vaulthook.
*
* @return VaultHook.
*/
public VaultHook getVaultHook()
Expand All @@ -464,6 +468,7 @@ public WebManager getWebManager()

/**
* This method allows to access static addon instance.
*
* @return Addon instance.
*/
public static StoneGeneratorAddon getInstance()
Expand Down Expand Up @@ -516,7 +521,6 @@ public static StoneGeneratorAddon getInstance()
*/
private Level levelAddon;


/**
* Static addon isntance.
*/
Expand All @@ -527,16 +531,13 @@ public static StoneGeneratorAddon getInstance()
// Section: Flags
// ---------------------------------------------------------------------


/**
* Settings flags allows to modifying parameters of the island.
*
* It can be modified by the players (island owner).
* This is usually an on/off setting.
*
* MAGIC_COBBLESTONE_GENERATOR should also be defined in language file under
* protection.flags section.
*
* <p>
* It can be modified by the players (island owner). This is usually an on/off setting.
* <p>
* MAGIC_COBBLESTONE_GENERATOR should also be defined in language file under protection.flags section.
* <p>
* By default setting is set to false.
*/
public final static Flag MAGIC_COBBLESTONE_GENERATOR =
Expand All @@ -546,14 +547,15 @@ public static StoneGeneratorAddon getInstance()
build();

/**
* This flag allows to change who have access to modify island generator tiers option.
* Owner can change it from member rank till owner rank.
* Default value is set to subowner.
* This flag allows to change who have access to modify island generator tiers option. Owner can change it from
* member rank till owner rank. Default value is set to subowner.
*/
public final static Flag MAGIC_COBBLESTONE_GENERATOR_PERMISSION =
new Flag.Builder("MAGIC_COBBLESTONE_GENERATOR_PERMISSION", Material.DIAMOND_PICKAXE).
type(Flag.Type.PROTECTION).
defaultRank(RanksManager.SUB_OWNER_RANK).
clickHandler(new CycleClick("MAGIC_COBBLESTONE_GENERATOR_PERMISSION", RanksManager.MEMBER_RANK, RanksManager.OWNER_RANK)).
clickHandler(new CycleClick("MAGIC_COBBLESTONE_GENERATOR_PERMISSION",
RanksManager.MEMBER_RANK,
RanksManager.OWNER_RANK)).
build();
}

0 comments on commit 573a246

Please sign in to comment.