mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-18 23:27:43 +01:00
Split Level from core plugin
This commit is contained in:
parent
251c2e92f2
commit
c50fabe827
@ -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 */
|
/* /is name <name> - Set island display name */
|
||||||
registerArgument(new String[] {"name"}, new CommandArgumentHandler() {
|
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 */
|
/* /is limits - Show the (tile) entities limits */
|
||||||
registerArgument(new String[] {"limits"}, new CommandArgumentHandler() {
|
registerArgument(new String[] {"limits"}, new CommandArgumentHandler() {
|
||||||
|
|
||||||
|
@ -136,12 +136,8 @@ public class BSBLocale {
|
|||||||
public String islandHelpControlPanel;
|
public String islandHelpControlPanel;
|
||||||
public String islandHelpReset;
|
public String islandHelpReset;
|
||||||
public String islandHelpSetHome;
|
public String islandHelpSetHome;
|
||||||
public String islandHelpLevel;
|
|
||||||
public String islandHelpLevelOther;
|
|
||||||
public String islandHelpName;
|
public String islandHelpName;
|
||||||
public String islandHelpResetName;
|
public String islandHelpResetName;
|
||||||
public String islandHelpTopTen;
|
|
||||||
public String islandHelpValue;
|
|
||||||
public String islandHelpLimits;
|
public String islandHelpLimits;
|
||||||
public String islandHelpTeam;
|
public String islandHelpTeam;
|
||||||
public String islandHelpInvite;
|
public String islandHelpInvite;
|
||||||
|
@ -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.
|
* Puts a player in a team. Removes them from their old island if required.
|
||||||
* @param playerUUID
|
* @param playerUUID
|
||||||
|
@ -65,10 +65,6 @@ public class Island {
|
|||||||
private boolean isSpawn = false;
|
private boolean isSpawn = false;
|
||||||
private boolean purgeProtected = false;
|
private boolean purgeProtected = false;
|
||||||
|
|
||||||
//// Rating ////
|
|
||||||
private int level;
|
|
||||||
private int levelHandicap;
|
|
||||||
|
|
||||||
//// Protection ////
|
//// Protection ////
|
||||||
private HashMap<SettingsFlag, Boolean> flags = new HashMap<SettingsFlag, Boolean>();
|
private HashMap<SettingsFlag, Boolean> flags = new HashMap<SettingsFlag, Boolean>();
|
||||||
|
|
||||||
@ -294,34 +290,6 @@ public class Island {
|
|||||||
this.purgeProtected = purgeProtected;
|
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
|
* Island Guard Settings flags
|
||||||
* Covers island, spawn and system settings
|
* Covers island, spawn and system settings
|
||||||
|
@ -26,7 +26,6 @@ public class Players {
|
|||||||
private int deaths;
|
private int deaths;
|
||||||
private HashMap<Location, Date> kickedList;
|
private HashMap<Location, Date> kickedList;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param uuid
|
* @param uuid
|
||||||
* Constructor - initializes the state variables
|
* Constructor - initializes the state variables
|
||||||
|
Loading…
Reference in New Issue
Block a user