Split Level from core plugin

This commit is contained in:
Poslovitch 2017-05-21 10:28:22 +02:00
parent 251c2e92f2
commit c50fabe827
5 changed files with 0 additions and 146 deletions

View File

@ -279,34 +279,6 @@ public class IslandCommand extends BSBCommand{
}
});
/* /is level [player] - Calculate and display island level */
registerArgument(new String[] {"level"}, new CommandArgumentHandler() {
@Override
public boolean canExecute(CommandSender sender, String label, String[] args) {
// TODO Auto-generated method stub
return false;
}
@Override
public void onExecute(CommandSender sender, String label, String[] args) {
// TODO Auto-generated method stub
}
@Override
public List<String> onTabComplete(CommandSender sender, String label, String[] args) {
// TODO Auto-generated method stub
return null;
}
@Override
public String[] getHelp(CommandSender sender, String label){
return new String[] {null, plugin.getLocale(sender).islandHelpLevel,
"[player]", plugin.getLocale(sender).islandHelpLevelOther};
}
});
/* /is name <name> - Set island display name */
registerArgument(new String[] {"name"}, new CommandArgumentHandler() {
@ -421,60 +393,6 @@ public class IslandCommand extends BSBCommand{
}
});
/* /is topten - Display top ten */
registerArgument(new String[] {"topten", "top"}, new CommandArgumentHandler() {
@Override
public boolean canExecute(CommandSender sender, String label, String[] args) {
// TODO Auto-generated method stub
return false;
}
@Override
public void onExecute(CommandSender sender, String label, String[] args) {
// TODO Auto-generated method stub
}
@Override
public List<String> onTabComplete(CommandSender sender, String label, String[] args) {
// TODO Auto-generated method stub
return null;
}
@Override
public String[] getHelp(CommandSender sender, String label){
return new String[] {null, plugin.getLocale(sender).islandHelpTopTen};
}
});
/* /is value - Show the value of the block in hand */
registerArgument(new String[] {"value"}, new CommandArgumentHandler() {
@Override
public boolean canExecute(CommandSender sender, String label, String[] args) {
// TODO Auto-generated method stub
return false;
}
@Override
public void onExecute(CommandSender sender, String label, String[] args) {
// TODO Auto-generated method stub
}
@Override
public List<String> onTabComplete(CommandSender sender, String label, String[] args) {
// TODO Auto-generated method stub
return null;
}
@Override
public String[] getHelp(CommandSender sender, String label){
return new String[] {null, plugin.getLocale(sender).islandHelpValue};
}
});
/* /is limits - Show the (tile) entities limits */
registerArgument(new String[] {"limits"}, new CommandArgumentHandler() {

View File

@ -136,12 +136,8 @@ public class BSBLocale {
public String islandHelpControlPanel;
public String islandHelpReset;
public String islandHelpSetHome;
public String islandHelpLevel;
public String islandHelpLevelOther;
public String islandHelpName;
public String islandHelpResetName;
public String islandHelpTopTen;
public String islandHelpValue;
public String islandHelpLimits;
public String islandHelpTeam;
public String islandHelpInvite;

View File

@ -139,33 +139,6 @@ public class IslandsManager {
}
}
/**
* Get the island level
* @param playerUUID
* @return Level of island, or null if unknown
*/
public Integer getIslandLevel(UUID playerUUID) {
if (islandsByUUID.containsKey(playerUUID))
return islandsByUUID.get(playerUUID).getLevel();
return null;
}
/**
* Set the island level for this player
* @param playerUUID
* @param islandLevel
* @return true if successful, false if not
*/
public boolean setIslandLevel(UUID playerUUID, int islandLevel) {
if (islandsByUUID.containsKey(playerUUID)) {
islandsByUUID.get(playerUUID).setLevel(islandLevel);
// TODO
//plugin.getChatListener().setPlayerLevel(playerUUID, islandLevel);
return true;
}
return false;
}
/**
* Puts a player in a team. Removes them from their old island if required.
* @param playerUUID

View File

@ -65,10 +65,6 @@ public class Island {
private boolean isSpawn = false;
private boolean purgeProtected = false;
//// Rating ////
private int level;
private int levelHandicap;
//// Protection ////
private HashMap<SettingsFlag, Boolean> flags = new HashMap<SettingsFlag, Boolean>();
@ -294,34 +290,6 @@ public class Island {
this.purgeProtected = purgeProtected;
}
/**
* @return the island level
*/
public int getLevel(){
return level;
}
/**
* @param level - the island level to set
*/
public void setLevel(int level){
this.level = level;
}
/**
* @return the island level handicap
*/
public int getLevelHandicap(){
return levelHandicap;
}
/**
* @param levelHandicap - the island level handicap to set
*/
public void setLevelHandicap(int levelHandicap){
this.levelHandicap = levelHandicap;
}
/**
* Island Guard Settings flags
* Covers island, spawn and system settings

View File

@ -26,7 +26,6 @@ public class Players {
private int deaths;
private HashMap<Location, Date> kickedList;
/**
* @param uuid
* Constructor - initializes the state variables