Remove unnecessary access modifiers on interface methods.

This commit is contained in:
Andreas Troelsen 2017-03-13 21:32:25 +01:00
parent e988f5697c
commit 1da7b564d1
13 changed files with 194 additions and 194 deletions

View File

@ -24,5 +24,5 @@ public interface Command
* @return true, if the command succeeded in any way, false if the
* command handler should print the usage message to the sender
*/
public boolean execute(ArenaMaster am, CommandSender sender, String... args);
boolean execute(ArenaMaster am, CommandSender sender, String... args);
}

View File

@ -9,25 +9,25 @@ public @interface CommandInfo
/**
* The actual name of the command. Not really used anywhere.
*/
public String name();
String name();
/**
* A regex pattern that allows minor oddities and alternatives to the command name.
*/
public String pattern();
String pattern();
/**
* The usage message, i.e. how the command should be used.
*/
public String usage();
String usage();
/**
* A description of what the command does.
*/
public String desc();
String desc();
/**
* The permission required to execute this command.
*/
public String permission();
String permission();
}

View File

@ -38,95 +38,95 @@ public interface Arena
//
/////////////////////////////////////////////////////////////////////////*/
public ConfigurationSection getSettings();
ConfigurationSection getSettings();
public World getWorld();
World getWorld();
public void setWorld(World world);
void setWorld(World world);
public boolean isEnabled();
boolean isEnabled();
public void setEnabled(boolean value);
void setEnabled(boolean value);
public boolean isProtected();
boolean isProtected();
public void setProtected(boolean value);
void setProtected(boolean value);
public boolean isRunning();
boolean isRunning();
public boolean inEditMode();
boolean inEditMode();
public void setEditMode(boolean value);
void setEditMode(boolean value);
public int getMinPlayers();
int getMinPlayers();
public int getMaxPlayers();
int getMaxPlayers();
public List<ItemStack> getEntryFee();
List<ItemStack> getEntryFee();
public Set<Map.Entry<Integer,List<ItemStack>>> getEveryWaveEntrySet();
Set<Map.Entry<Integer,List<ItemStack>>> getEveryWaveEntrySet();
public List<ItemStack> getAfterWaveReward(int wave);
List<ItemStack> getAfterWaveReward(int wave);
public Set<Player> getPlayersInArena();
Set<Player> getPlayersInArena();
public Set<Player> getPlayersInLobby();
Set<Player> getPlayersInLobby();
public Set<Player> getReadyPlayersInLobby();
Set<Player> getReadyPlayersInLobby();
public Set<Player> getSpectators();
Set<Player> getSpectators();
public MASpawnThread getSpawnThread();
MASpawnThread getSpawnThread();
public WaveManager getWaveManager();
WaveManager getWaveManager();
public Location getPlayerEntry(Player p);
Location getPlayerEntry(Player p);
public ArenaListener getEventListener();
ArenaListener getEventListener();
public void setLeaderboard(Leaderboard leaderboard);
void setLeaderboard(Leaderboard leaderboard);
public ArenaPlayer getArenaPlayer(Player p);
ArenaPlayer getArenaPlayer(Player p);
public Set<Block> getBlocks();
Set<Block> getBlocks();
public void addBlock(Block b);
void addBlock(Block b);
public boolean removeBlock(Block b);
boolean removeBlock(Block b);
public boolean hasPet(Entity e);
boolean hasPet(Entity e);
public void addRepairable(Repairable r);
void addRepairable(Repairable r);
public ArenaRegion getRegion();
ArenaRegion getRegion();
public InventoryManager getInventoryManager();
InventoryManager getInventoryManager();
public RewardManager getRewardManager();
RewardManager getRewardManager();
public MonsterManager getMonsterManager();
MonsterManager getMonsterManager();
public ClassLimitManager getClassLimitManager();
ClassLimitManager getClassLimitManager();
public void revivePlayer(Player p);
void revivePlayer(Player p);
public ScoreboardManager getScoreboard();
ScoreboardManager getScoreboard();
public Messenger getMessenger();
Messenger getMessenger();
public Messenger getGlobalMessenger();
Messenger getGlobalMessenger();
public void announce(String msg);
void announce(String msg);
public void announce(Msg msg, String s);
void announce(Msg msg, String s);
public void announce(Msg msg);
void announce(Msg msg);
public void scheduleTask(Runnable r, int delay);
void scheduleTask(Runnable r, int delay);
@ -139,45 +139,45 @@ public interface Arena
public boolean startArena();
boolean startArena();
public boolean endArena();
boolean endArena();
public void forceStart();
void forceStart();
public void forceEnd();
void forceEnd();
public boolean playerJoin(Player p, Location loc);
boolean playerJoin(Player p, Location loc);
public void playerReady(Player p);
void playerReady(Player p);
public boolean playerLeave(Player p);
boolean playerLeave(Player p);
public void playerDeath(Player p);
void playerDeath(Player p);
public void playerRespawn(Player p);
void playerRespawn(Player p);
public Location getRespawnLocation(Player p);
Location getRespawnLocation(Player p);
public void playerSpec(Player p, Location loc);
void playerSpec(Player p, Location loc);
public void storePlayerData(Player p, Location loc);
void storePlayerData(Player p, Location loc);
public void storeContainerContents();
void storeContainerContents();
public void restoreContainerContents();
void restoreContainerContents();
public void movePlayerToLobby(Player p);
void movePlayerToLobby(Player p);
public void movePlayerToSpec(Player p);
void movePlayerToSpec(Player p);
public void movePlayerToEntry(Player p);
void movePlayerToEntry(Player p);
public void discardPlayer(Player p);
void discardPlayer(Player p);
public void repairBlocks();
void repairBlocks();
public void queueRepairable(Repairable r);
void queueRepairable(Repairable r);
@ -187,19 +187,19 @@ public interface Arena
//
////////////////////////////////////////////////////////////////////*/
public void assignClass(Player p, String className);
void assignClass(Player p, String className);
public void assignClassGiveInv(Player p, String className, ItemStack[] contents);
void assignClassGiveInv(Player p, String className, ItemStack[] contents);
public void addRandomPlayer(Player p);
void addRandomPlayer(Player p);
public void assignRandomClass(Player p);
void assignRandomClass(Player p);
public void assignClassPermissions(Player p);
void assignClassPermissions(Player p);
public void removeClassPermissions(Player p);
void removeClassPermissions(Player p);
public void addPermission(Player p, String perm, boolean value);
void addPermission(Player p, String perm, boolean value);
@ -209,7 +209,7 @@ public interface Arena
//
////////////////////////////////////////////////////////////////////*/
public void restoreRegion();
void restoreRegion();
@ -219,43 +219,43 @@ public interface Arena
//
////////////////////////////////////////////////////////////////////*/
public boolean inArena(Player p);
boolean inArena(Player p);
public boolean inLobby(Player p);
boolean inLobby(Player p);
public boolean inSpec(Player p);
boolean inSpec(Player p);
public boolean isDead(Player p);
boolean isDead(Player p);
public String configName();
String configName();
public String arenaName();
String arenaName();
public MobArena getPlugin();
MobArena getPlugin();
public Map<String,ArenaClass> getClasses();
Map<String,ArenaClass> getClasses();
public int getPlayerCount();
int getPlayerCount();
public List<Player> getAllPlayers();
List<Player> getAllPlayers();
public Collection<ArenaPlayer> getArenaPlayerSet();
Collection<ArenaPlayer> getArenaPlayerSet();
public List<Player> getNonreadyPlayers();
List<Player> getNonreadyPlayers();
public boolean canAfford(Player p);
boolean canAfford(Player p);
public boolean takeFee(Player p);
boolean takeFee(Player p);
public boolean refund(Player p);
boolean refund(Player p);
public boolean canJoin(Player p);
boolean canJoin(Player p);
public boolean canSpec(Player p);
boolean canSpec(Player p);
public boolean hasIsolatedChat();
boolean hasIsolatedChat();
public Player getLastPlayerStanding();
Player getLastPlayerStanding();
public AutoStartTimer getAutoStartTimer();
AutoStartTimer getAutoStartTimer();
}

View File

@ -22,25 +22,25 @@ public interface ArenaMaster
/////////////////////////////////////////////////////////////////////////*/
public MobArena getPlugin();
MobArena getPlugin();
public Messenger getGlobalMessenger();
Messenger getGlobalMessenger();
public boolean isEnabled();
boolean isEnabled();
public void setEnabled(boolean value);
void setEnabled(boolean value);
public boolean notifyOnUpdates();
boolean notifyOnUpdates();
public List<Arena> getArenas();
List<Arena> getArenas();
public Map<String,ArenaClass> getClasses();
Map<String,ArenaClass> getClasses();
public void addPlayer(Player p, Arena arena);
void addPlayer(Player p, Arena arena);
public Arena removePlayer(Player p);
Arena removePlayer(Player p);
public void resetArenaMap();
void resetArenaMap();
@ -51,41 +51,41 @@ public interface ArenaMaster
/////////////////////////////////////////////////////////////////////////*/
public List<Arena> getEnabledArenas();
List<Arena> getEnabledArenas();
public List<Arena> getEnabledArenas(List<Arena> arenas);
List<Arena> getEnabledArenas(List<Arena> arenas);
public List<Arena> getPermittedArenas(Player p);
List<Arena> getPermittedArenas(Player p);
public List<Arena> getEnabledAndPermittedArenas(Player p);
List<Arena> getEnabledAndPermittedArenas(Player p);
public Arena getArenaAtLocation(Location loc);
Arena getArenaAtLocation(Location loc);
public List<Arena> getArenasInWorld(World world);
List<Arena> getArenasInWorld(World world);
public List<Player> getAllPlayers();
List<Player> getAllPlayers();
public List<Player> getAllPlayersInArena(String arenaName);
List<Player> getAllPlayersInArena(String arenaName);
public List<Player> getAllLivingPlayers();
List<Player> getAllLivingPlayers();
public List<Player> getLivingPlayersInArena(String arenaName);
List<Player> getLivingPlayersInArena(String arenaName);
public Arena getArenaWithPlayer(Player p);
Arena getArenaWithPlayer(Player p);
public Arena getArenaWithPlayer(String playerName);
Arena getArenaWithPlayer(String playerName);
public Arena getArenaWithSpectator(Player p);
Arena getArenaWithSpectator(Player p);
public Arena getArenaWithMonster(Entity e);
Arena getArenaWithMonster(Entity e);
public Arena getArenaWithPet(Entity e);
Arena getArenaWithPet(Entity e);
public Arena getArenaWithName(String configName);
Arena getArenaWithName(String configName);
public Arena getArenaWithName(Collection<Arena> arenas, String configName);
Arena getArenaWithName(Collection<Arena> arenas, String configName);
public boolean isAllowed(String command);
boolean isAllowed(String command);
@ -95,40 +95,40 @@ public interface ArenaMaster
//
/////////////////////////////////////////////////////////////////////////*/
public void initialize();
void initialize();
/**
* Load the global settings.
*/
public void loadSettings();
void loadSettings();
/**
* Load all class-related stuff.
*/
public void loadClasses();
void loadClasses();
public ArenaClass createClassNode(String className, PlayerInventory inv, boolean safe);
ArenaClass createClassNode(String className, PlayerInventory inv, boolean safe);
public void removeClassNode(String className);
void removeClassNode(String className);
public boolean addClassPermission(String className, String perm);
boolean addClassPermission(String className, String perm);
public boolean removeClassPermission(String className, String perm);
boolean removeClassPermission(String className, String perm);
/**
* Load all arena-related stuff.
*/
public void loadArenas();
void loadArenas();
public void loadArenasInWorld(String worldName);
void loadArenasInWorld(String worldName);
public void unloadArenasInWorld(String worldName);
void unloadArenasInWorld(String worldName);
public boolean reloadArena(String name);
boolean reloadArena(String name);
public Arena createArenaNode(String configName, World world);
Arena createArenaNode(String configName, World world);
public void removeArenaNode(Arena arena);
void removeArenaNode(Arena arena);
@ -138,7 +138,7 @@ public interface ArenaMaster
//
/////////////////////////////////////////////////////////////////////////*/
public void reloadConfig();
void reloadConfig();
public void saveConfig();
void saveConfig();
}

View File

@ -11,7 +11,7 @@ public interface LeaderboardColumn
* Update all the signs in this column to the current values
* of the player stat associated with this column.
*/
public void update(List<ArenaPlayerStatistics> stats);
void update(List<ArenaPlayerStatistics> stats);
/**
* Get the String representation of the stat in question.
@ -20,23 +20,23 @@ public interface LeaderboardColumn
* @param stats an ArenaPlayerStatistics object
* @return the String representation of the stat in question
*/
public String getLine(ArenaPlayerStatistics stats);
String getLine(ArenaPlayerStatistics stats);
/**
* Clear the text on all the signs in the column.
*/
public void clear();
void clear();
/**
* Get the top sign of the column.
* The top sign displays the stat name.
* @return the top sign of the column
*/
public Sign getHeader();
Sign getHeader();
/**
* Get all signs in the column (minus the header).
* @return all signs in the column (minus the header)
*/
public List<Sign> getSigns();
List<Sign> getSigns();
}

View File

@ -6,16 +6,16 @@ import org.bukkit.block.BlockState;
public interface Repairable
{
public void repair();
void repair();
public BlockState getState();
BlockState getState();
public Material getType();
public int getId();
public byte getData();
Material getType();
int getId();
byte getData();
public World getWorld();
public int getX();
public int getY();
public int getZ();
World getWorld();
int getX();
int getY();
int getZ();
}

View File

@ -8,17 +8,17 @@ public interface TimeStrategy
* Set the time enum used by setPlayerTime()
* @param time a Time enum
*/
public void setTime(Time time);
void setTime(Time time);
/**
* Set the local client time for the player.
* @param p a player
*/
public void setPlayerTime(Player p);
void setPlayerTime(Player p);
/**
* Reset the local client time for the player to the server time
* @param p a player
*/
public void resetPlayerTime(Player p);
void resetPlayerTime(Player p);
}

View File

@ -31,19 +31,19 @@ public interface Timer {
/**
* Start the timer.
*/
public void start();
void start();
/**
* Stop the timer.
*/
public void stop();
void stop();
/**
* Check if the timer is running.
*
* @return true, if the timer is currently running, false otherwise
*/
public boolean isRunning();
boolean isRunning();
/**
* Set the callback object of the timer.
@ -62,14 +62,14 @@ public interface Timer {
* @throws IllegalArgumentException if the callback is null
* @throws IllegalStateException if the callback has already been set
*/
public void setCallback(TimerCallback callback);
void setCallback(TimerCallback callback);
/**
* Get the tick interval of the timer.
*
* @return the tick interval of the timer
*/
public long getInterval();
long getInterval();
/**
* Set the tick interval of the timer.
@ -82,5 +82,5 @@ public interface Timer {
* @param interval tick interval of the timer; must be positive
* @throws IllegalArgumentException if the value is non-positive
*/
public void setInterval(long interval);
void setInterval(long interval);
}

View File

@ -14,7 +14,7 @@ public interface TimerCallback {
* which means the interval can be changed within this method prior to
* the timer actually starting.
*/
public void onStart();
void onStart();
/**
* Called when the timer ticks.
@ -22,7 +22,7 @@ public interface TimerCallback {
* Ticks are implementation-specific. Refer to the documentation of the
* specific timer for details.
*/
public void onTick();
void onTick();
/**
* Called when the timer finishes.
@ -31,7 +31,7 @@ public interface TimerCallback {
* For example, the {@link CountdownTimer} finishes when it has counted
* down to 0.
*/
public void onFinish();
void onFinish();
/**
* Called when the timer is stopped prematurely.
@ -41,5 +41,5 @@ public interface TimerCallback {
* stopped manually, in which case this method is called instead of
* the {@code onFinish()} method.
*/
public void onStop();
void onStop();
}

View File

@ -19,7 +19,7 @@ public interface Wave
* @param arena an Arena
* @return a collection of MACreatures and how many of each to spawn
*/
public Map<MACreature,Integer> getMonstersToSpawn(int wave, int playerCount, Arena arena);
Map<MACreature,Integer> getMonstersToSpawn(int wave, int playerCount, Arena arena);
/**
* Get a list of spawnpoints upon which the monsters of this
@ -30,7 +30,7 @@ public interface Wave
* @param arena an Arena
* @return a list of valid spawnpoints
*/
public List<Location> getSpawnpoints(Arena arena);
List<Location> getSpawnpoints(Arena arena);
/**
* Set the list of spawnpoints on which the monsters of this
@ -38,110 +38,110 @@ public interface Wave
* of the arena region will be considered.
* @param spawnpoints a list of spawnpoints
*/
public void setSpawnpoints(List<Location> spawnpoints);
void setSpawnpoints(List<Location> spawnpoints);
/**
* Announce to all players that this wave is spawning.
* @param arena an arena
* @param wave a wave number
*/
public void announce(Arena arena, int wave);
void announce(Arena arena, int wave);
/**
* Get the wave's name.
* @return The name
*/
public String getName();
String getName();
/**
* Set the name of this wave.
* @param name a name
*/
public void setName(String name);
void setName(String name);
/**
* Get the branch type.
* @return The WaveBranch of this Wave.
*/
public WaveBranch getBranch();
WaveBranch getBranch();
/**
* Set the type of branch
* @param branch recurrent or single
*/
public void setBranch(WaveBranch branch);
void setBranch(WaveBranch branch);
/**
* Get the type of wave.
* @return a WaveType
*/
public WaveType getType();
WaveType getType();
/**
* Set the type of wave.
* @param type a WaveType
*/
public void setType(WaveType type);
void setType(WaveType type);
/**
* Get the first wave this Wave instance may spawn on.
* @return a wave number
*/
public int getFirstWave();
int getFirstWave();
/**
* Set the first wave this Wave instance may spawn on.
* @param firstWave a wave number
*/
public void setFirstWave(int firstWave);
void setFirstWave(int firstWave);
/**
* Get the wave's frequency, i.e. wave number "modulo"
* @return a frequency
*/
public int getFrequency();
int getFrequency();
/**
* Set the wave's frequency
* @param frequency a frequency
*/
public void setFrequency(int frequency);
void setFrequency(int frequency);
/**
* Get the wave's priority value.
* @return a priority
*/
public int getPriority();
int getPriority();
/**
* Set the wave's priority.
* @param priority a priority
*/
public void setPriority(int priority);
void setPriority(int priority);
/**
* Get the wave's health multiplier.
* @return The health multiplier
*/
public double getHealthMultiplier();
double getHealthMultiplier();
/**
* Get the wave's health multiplier.
* @param healthMultiplier a double in the range ]0;1]
*/
public void setHealthMultiplier(double healthMultiplier);
void setHealthMultiplier(double healthMultiplier);
/**
* Get the wave's amount multiplier.
* @return The amount multiplier
*/
public double getAmountMultiplier();
double getAmountMultiplier();
/**
* Set the wave's amount multiplier.
* @param amountMultiplier a positive double
*/
public void setAmountMultiplier(double amountMultiplier);
void setAmountMultiplier(double amountMultiplier);
/**
* Check if this wave matches the wave number.
@ -151,7 +151,7 @@ public interface Wave
* @param wave The current wave number
* @return true, if the wave should spawn, false otherwise
*/
public boolean matches(int wave);
boolean matches(int wave);
/**
* Make a copy of the wave.
@ -161,5 +161,5 @@ public interface Wave
*
* @return a copy of the wave
*/
public Wave copy();
Wave copy();
}

View File

@ -14,5 +14,5 @@ public interface Ability
* @param arena the Arena of the boss
* @param boss the MABoss object
*/
public void execute(Arena arena, MABoss boss);
void execute(Arena arena, MABoss boss);
}

View File

@ -10,11 +10,11 @@ public @interface AbilityInfo
* The "pretty print" name of the ability.
* This value is printed when a boss executes the ability in the arena.
*/
public String name();
String name();
/**
* The config aliases for the ability.
* This is used by MobArena to parse ability names from the config-file.
*/
public String[] aliases();
String[] aliases();
}

View File

@ -67,8 +67,8 @@ public class UpgradeWave extends AbstractWave
/**
* Represents an upgrade for an upgrade wave
*/
public static interface Upgrade {
public void upgrade(Arena arena, Player p);
public interface Upgrade {
void upgrade(Arena arena, Player p);
}
/**