fixed grammar/spelling mistakes and formatting inconsistencies (comments, not code)

This commit is contained in:
Jack Fitch 2022-06-28 22:48:01 -04:00
parent a0542b8434
commit d754cb58d5
No known key found for this signature in database
GPG Key ID: 753BA18D9DE77C27
5 changed files with 248 additions and 156 deletions

View File

@ -140,17 +140,17 @@ public class ExamplePlugin extends JavaPlugin {
Player player = (Player) sender;
if(command.getLabel().equals("test-economy")) {
// Lets give the player 1.05 currency (note that SOME economic plugins require rounding!)
// Let's give the player 1.05 currency (note that SOME economic plugins require rounding!)
sender.sendMessage(String.format("You have %s", econ.format(econ.getBalance(player.getName()))));
EconomyResponse r = econ.depositPlayer(player, 1.05);
if(r.transactionSuccess()) {
sender.sendMessage(String.format("You were given %s and now have %s", econ.format(r.amount), econ.format(r.balance)));
} else {
sender.sendMessage(String.format("An error occured: %s", r.errorMessage));
sender.sendMessage(String.format("An error occurred: %s", r.errorMessage));
}
return true;
} else if(command.getLabel().equals("test-permission")) {
// Lets test if user has the node "example.plugin.awesome" to determine if they are awesome or just suck
// Let's test if user has the node "example.plugin.awesome" to determine if they are awesome or just suck
if(perms.has(player, "example.plugin.awesome")) {
sender.sendMessage("You are awesome!");
} else {

View File

@ -33,13 +33,15 @@ public abstract class Chat {
this.perms = perms;
}
/**
* Gets name of permission method
* Gets name of permission method.
*
* @return Name of Permission Method
*/
abstract public String getName();
/**
* Checks if permission method is enabled.
*
* @return Success or Failure
*/
abstract public boolean isEnabled();
@ -47,7 +49,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerPrefix(String, OfflinePlayer)} instead.
*
* Get players prefix
* Get player's prefix.
*
* @param world World name
* @param player Player name
* @return Prefix
@ -56,8 +59,8 @@ public abstract class Chat {
abstract public String getPlayerPrefix(String world, String player);
/**
* Get a players prefix in the given world
* Use NULL for world if requesting a global prefix
* Get a player's prefix in the given world.
* Use NULL for world if requesting a global prefix.
*
* @param world World name
* @param player OfflinePlayer
@ -70,7 +73,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerPrefix(String, OfflinePlayer)} instead.
*
* Get players prefix
* Get player's prefix.
*
* @param world World Object
* @param player Player name
* @return Prefix
@ -81,7 +85,7 @@ public abstract class Chat {
}
/**
* Get players prefix from the world they are currently in.
* Get player's prefix from the world they are currently in.
* May or may not return the global prefix depending on implementation.
*
* @param player Player Object
@ -94,7 +98,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerPrefix(String, OfflinePlayer, String)} instead.
*
* Set players prefix
* Set player's prefix.
*
* @param world World name
* @param player Player name
* @param prefix Prefix
@ -103,7 +108,7 @@ public abstract class Chat {
abstract public void setPlayerPrefix(String world, String player, String prefix);
/**
* Sets players prefix in the given world.
* Sets player's prefix in the given world.
* Use NULL for world for setting in the Global scope.
*
* @param world World name
@ -117,7 +122,7 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerPrefix(String, OfflinePlayer, String)} instead.
*
* Set players prefix in the given world.
* Set player's prefix in the given world.
*
* @param world World Object
* @param player Player name
@ -129,7 +134,7 @@ public abstract class Chat {
}
/**
* Set players prefix in the world they are currently in.
* Set player's prefix in the world they are currently in.
*
* @param player Player Object
* @param prefix Prefix
@ -141,7 +146,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerSuffix(String, OfflinePlayer)} instead.
*
* Get players suffix
* Get player's suffix.
*
* @param world World name
* @param player Player name
* @return Suffix
@ -150,7 +156,7 @@ public abstract class Chat {
abstract public String getPlayerSuffix(String world, String player);
/**
* Get players suffix in the specified world.
* Get player's suffix in the specified world.
*
* @param world World name
* @param player OfflinePlayer name
@ -163,7 +169,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerSuffix(String, OfflinePlayer)} instead.
*
* Get players suffix
* Get player's suffix.
*
* @param world World Object
* @param player Player name
* @return Suffix
@ -174,7 +181,7 @@ public abstract class Chat {
}
/**
* Get players suffix in the world they are currently in.
* Get player's suffix in the world they are currently in.
*
* @param player Player Object
* @return Suffix
@ -186,7 +193,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerSuffix(String, OfflinePlayer, String)} instead.
*
* Set players suffix
* Set player's suffix.
*
* @param world World name
* @param player Player name
* @param suffix Suffix
@ -195,7 +203,7 @@ public abstract class Chat {
abstract public void setPlayerSuffix(String world, String player, String suffix);
/**
* Set players suffix for the world specified
* Set player's suffix for the world specified.
*
* @param world World name
* @param player OfflinePlayer
@ -208,7 +216,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerSuffix(String, OfflinePlayer, String)} instead.
*
* Set players suffix
* Set player's suffix.
*
* @param world World Object
* @param player Player name
* @param suffix Suffix
@ -219,7 +228,7 @@ public abstract class Chat {
}
/**
* Set players suffix in the world they currently occupy.
* Set player's suffix in the world they currently occupy.
*
* @param player Player Object
* @param suffix Suffix
@ -229,7 +238,8 @@ public abstract class Chat {
}
/**
* Get group prefix
* Get group prefix.
*
* @param world World name
* @param group Group name
* @return Prefix
@ -237,7 +247,8 @@ public abstract class Chat {
abstract public String getGroupPrefix(String world, String group);
/**
* Get group prefix
* Get group prefix.
*
* @param world World Object
* @param group Group name
* @return Prefix
@ -247,7 +258,8 @@ public abstract class Chat {
}
/**
* Set group prefix
* Set group prefix.
*
* @param world World name
* @param group Group name
* @param prefix Prefix
@ -255,7 +267,8 @@ public abstract class Chat {
abstract public void setGroupPrefix(String world, String group, String prefix);
/**
* Set group prefix
* Set group prefix.
*
* @param world World Object
* @param group Group name
* @param prefix Prefix
@ -265,7 +278,8 @@ public abstract class Chat {
}
/**
* Get group suffix
* Get group suffix.
*
* @param world World name
* @param group Group name
* @return Suffix
@ -273,7 +287,8 @@ public abstract class Chat {
abstract public String getGroupSuffix(String world, String group);
/**
* Get group suffix
* Get group suffix.
*
* @param world World Object
* @param group Group name
* @return Suffix
@ -283,7 +298,8 @@ public abstract class Chat {
}
/**
* Set group suffix
* Set group suffix.
*
* @param world World name
* @param group Group name
* @param suffix Suffix
@ -291,7 +307,8 @@ public abstract class Chat {
abstract public void setGroupSuffix(String world, String group, String suffix);
/**
* Set group suffix
* Set group suffix.
*
* @param world World Object
* @param group Group name
* @param suffix Suffix
@ -301,7 +318,8 @@ public abstract class Chat {
}
/**
* Get a players informational node (Integer) value
* Get a player's informational node (Integer) value.
*
* @param world World name
* @param player OfflinePlayer
* @param node Permission node
@ -314,7 +332,9 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerInfoInteger(String, OfflinePlayer, String, int)} instead.
* Get a players informational node (Integer) value
*
* Get a player's informational node (Integer) value.
*
* @param world World name
* @param player Player name
* @param node Permission node
@ -327,7 +347,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerInfoInteger(String, OfflinePlayer, String, int)} instead.
*
* Get a players informational node (Integer) value
* Get a player's informational node (Integer) value.
*
* @param world World Object
* @param player Player name
* @param node Permission node
@ -340,7 +361,8 @@ public abstract class Chat {
}
/**
* Get a players informational node (Integer) value
* Get a player's informational node (Integer) value.
*
* @param player Player Object
* @param node Permission node
* @param defaultValue Default value
@ -351,7 +373,8 @@ public abstract class Chat {
}
/**
* Set a players informational node (Integer) value
* Set a player's informational node (Integer) value.
*
* @param world World name
* @param player OfflinePlayer
* @param node Permission node
@ -364,7 +387,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerInfoInteger(String, OfflinePlayer, String, int)} instead.
*
* Set a players informational node (Integer) value
* Set a player's informational node (Integer) value.
*
* @param world World name
* @param player Player name
* @param node Permission node
@ -376,7 +400,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerInfoInteger(String, OfflinePlayer, String, int)} instead.
*
* Set a players informational node (Integer) value
* Set a player's informational node (Integer) value.
*
* @param world World Object
* @param player Player name
* @param node Permission node
@ -388,7 +413,8 @@ public abstract class Chat {
}
/**
* Set a players informational node (Integer) value
* Set a player's informational node (Integer) value.
*
* @param player Player Object
* @param node Permission node
* @param value Value to set
@ -398,7 +424,8 @@ public abstract class Chat {
}
/**
* Get a groups informational node (Integer) value
* Get a group's informational node (Integer) value.
*
* @param world World name
* @param group Group name
* @param node Permission node
@ -408,7 +435,8 @@ public abstract class Chat {
abstract public int getGroupInfoInteger(String world, String group, String node, int defaultValue);
/**
* Get a groups informational node (Integer) value
* Get a group's informational node (Integer) value.
*
* @param world World Object
* @param group Group name
* @param node Permission node
@ -420,7 +448,8 @@ public abstract class Chat {
}
/**
* Set a groups informational node (Integer) value
* Set a group's informational node (Integer) value.
*
* @param world World name
* @param group Group name
* @param node Permission node
@ -429,7 +458,8 @@ public abstract class Chat {
abstract public void setGroupInfoInteger(String world, String group, String node, int value);
/**
* Set a groups informational node (Integer) value
* Set a groups informational node (Integer) value.
*
* @param world World Object
* @param group Group name
* @param node Permission node
@ -440,7 +470,8 @@ public abstract class Chat {
}
/**
* Get a players informational node (Double) value
* Get a player's informational node (Double) value.
*
* @param world World name
* @param player OfflinePlayer
* @param node Permission node
@ -454,7 +485,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerInfoDouble(String, OfflinePlayer, String, double)} instead.
*
* Get a players informational node (Double) value
* Get a player's informational node (Double) value.
*
* @param world World name
* @param player Player name
* @param node Permission node
@ -467,7 +499,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerInfoDouble(String, OfflinePlayer, String, double)} instead
*
* Get a players informational node (Double) value
* Get a player's informational node (Double) value.
*
* @param world World Object
* @param player Player name
* @param node Permission node
@ -480,7 +513,8 @@ public abstract class Chat {
}
/**
* Get a players informational node (Double) value
* Get a player's informational node (Double) value.
*
* @param player Player Object
* @param node Permission node
* @param defaultValue Default value
@ -491,7 +525,8 @@ public abstract class Chat {
}
/**
* Set a players informational node (Double) value
* Set a player's informational node (Double) value.
*
* @param world World name
* @param player OfflinePlayer
* @param node Permission node
@ -503,7 +538,9 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerInfoDouble(String, OfflinePlayer, String, double)} instead.
* Set a players informational node (Double) value
*
* Set a player's informational node (Double) value.
*
* @param world World name
* @param player Player name
* @param node Permission node
@ -514,7 +551,9 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerInfoDouble(String, OfflinePlayer, String, double)} instead.
* Set a players informational node (Double) value
*
* Set a player's informational node (Double) value.
*
* @param world World Object
* @param player Player name
* @param node Permission node
@ -526,7 +565,8 @@ public abstract class Chat {
}
/**
* Set a players informational node (Double) value
* Set a player's informational node (Double) value.
*
* @param player Player Object
* @param node Permission node
* @param value Value to set
@ -536,7 +576,8 @@ public abstract class Chat {
}
/**
* Get a groups informational node (Double) value
* Get a group's informational node (Double) value.
*
* @param world World name
* @param group Group name
* @param node Permission node
@ -546,7 +587,8 @@ public abstract class Chat {
abstract public double getGroupInfoDouble(String world, String group, String node, double defaultValue);
/**
* Get a groups informational node (Double) value
* Get a group's informational node (Double) value.
*
* @param world World Object
* @param group Group name
* @param node Permission node
@ -558,7 +600,8 @@ public abstract class Chat {
}
/**
* Set a groups informational node (Double) value
* Set a group's informational node (Double) value.
*
* @param world World name
* @param group Group name
* @param node Permission node
@ -567,7 +610,8 @@ public abstract class Chat {
abstract public void setGroupInfoDouble(String world, String group, String node, double value);
/**
* Set a groups informational node (Double) value
* Set a group's informational node (Double) value.
*
* @param world World Object
* @param group Group name
* @param node Permission node
@ -578,7 +622,8 @@ public abstract class Chat {
}
/**
* Get a players informational node (Boolean) value
* Get a player's informational node (Boolean) value.
*
* @param world World name
* @param player OfflinePlayer
* @param node Permission node
@ -592,7 +637,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerInfoBoolean(String, OfflinePlayer, String, boolean)} instead.
*
* Get a players informational node (Boolean) value
* Get a player's informational node (Boolean) value.
*
* @param world World name
* @param player Player name
* @param node Permission node
@ -605,7 +651,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerInfoBoolean(String, OfflinePlayer, String, boolean)} instead.
*
* Get a players informational node (Boolean) value
* Get a player's informational node (Boolean) value.
*
* @param world World Object
* @param player Player name
* @param node Permission node
@ -618,7 +665,8 @@ public abstract class Chat {
}
/**
* Get a players informational node (Boolean) value
* Get a player's informational node (Boolean) value.
*
* @param player Player Object
* @param node Permission node
* @param defaultValue Default value
@ -629,7 +677,8 @@ public abstract class Chat {
}
/**
* Set a players informational node (Boolean) value
* Set a player's informational node (Boolean) value.
*
* @param world World name
* @param player OfflinePlayer
* @param node Permission node
@ -641,7 +690,9 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerInfoBoolean(String, OfflinePlayer, String, boolean)} instead.
* Set a players informational node (Boolean) value
*
* Set a player's informational node (Boolean) value.
*
* @param world World name
* @param player Player name
* @param node Permission node
@ -652,7 +703,9 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerInfoBoolean(String, OfflinePlayer, String, boolean)} instead.
* Set a players informational node (Boolean) value
*
* Set a player's informational node (Boolean) value.
*
* @param world World Object
* @param player Player name
* @param node Permission node
@ -664,7 +717,8 @@ public abstract class Chat {
}
/**
* Set a players informational node (Boolean) value
* Set a player's informational node (Boolean) value.
*
* @param player Player Object
* @param node Permission node
* @param value Value to set
@ -674,7 +728,8 @@ public abstract class Chat {
}
/**
* Get a groups informational node (Boolean) value
* Get a group's informational node (Boolean) value.
*
* @param world Name of World
* @param group Name of Group
* @param node Permission node
@ -684,7 +739,8 @@ public abstract class Chat {
abstract public boolean getGroupInfoBoolean(String world, String group, String node, boolean defaultValue);
/**
* Set a players informational node (Boolean) value
* Set a player's informational node (Boolean) value.
*
* @param world World Object
* @param group Group name
* @param node Permission node
@ -696,7 +752,8 @@ public abstract class Chat {
}
/**
* Set a groups informational node (Boolean) value
* Set a group's informational node (Boolean) value.
*
* @param world World name
* @param group Group name
* @param node Permission node
@ -705,7 +762,8 @@ public abstract class Chat {
abstract public void setGroupInfoBoolean(String world, String group, String node, boolean value);
/**
* Set a players informational node (Boolean) value
* Set a player's informational node (Boolean) value.
*
* @param world World Object
* @param group Group name
* @param node Permission node
@ -716,7 +774,8 @@ public abstract class Chat {
}
/**
* Get a players informational node (String) value
* Get a player's informational node (String) value.
*
* @param world World name
* @param player OfflinePlayer
* @param node Permission node
@ -730,7 +789,8 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerInfoString(String, OfflinePlayer, String, String)} instead.
*
* Get a players informational node (String) value
* Get a player's informational node (String) value.
*
* @param world World name
* @param player Player name
* @param node Permission node
@ -742,7 +802,9 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerInfoString(String, OfflinePlayer, String, String)} instead.
* Get a players informational node (String) value
*
* Get a player's informational node (String) value.
*
* @param world World Object
* @param player Player name
* @param node Permission node
@ -755,7 +817,8 @@ public abstract class Chat {
}
/**
* Get a players informational node (String) value
* Get a player's informational node (String) value.
*
* @param player Player Object
* @param node Permission node
* @param defaultValue Default value
@ -766,7 +829,8 @@ public abstract class Chat {
}
/**
* Set a players informational node (String) value
* Set a player's informational node (String) value.
*
* @param world World name
* @param player OfflinePlayer
* @param node Permission node
@ -778,7 +842,9 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerInfoString(String, OfflinePlayer, String, String)} instead.
* Set a players informational node (String) value
*
* Set a player's informational node (String) value.
*
* @param world World name
* @param player Player name
* @param node Permission node
@ -789,7 +855,9 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerInfoString(String, OfflinePlayer, String, String)} instead.
* Set a players informational node (String) value
*
* Set a player's informational node (String) value.
*
* @param world World name
* @param player Player name
* @param node Permission node
@ -801,7 +869,8 @@ public abstract class Chat {
}
/**
* Set a players informational node (String) value
* Set a player's informational node (String) value.
*
* @param player Player Object
* @param node Permission node
* @param value Value ot set
@ -811,7 +880,8 @@ public abstract class Chat {
}
/**
* Get a groups informational node (String) value
* Get a group's informational node (String) value.
*
* @param world Name of World
* @param group Name of Group
* @param node Permission node
@ -821,7 +891,8 @@ public abstract class Chat {
abstract public String getGroupInfoString(String world, String group, String node, String defaultValue);
/**
* Set a players informational node (String) value
* Set a player's informational node (String) value.
*
* @param world World Object
* @param group Group name
* @param node Permission node
@ -833,7 +904,8 @@ public abstract class Chat {
}
/**
* Set a groups informational node (String) value
* Set a group's informational node (String) value.
*
* @param world World name
* @param group Group name
* @param node Permission node
@ -842,7 +914,8 @@ public abstract class Chat {
abstract public void setGroupInfoString(String world, String group, String node, String value);
/**
* Set a groups informational node (String) value
* Set a group's informational node (String) value.
*
* @param world World name
* @param group Group name
* @param node Permission node
@ -854,6 +927,7 @@ public abstract class Chat {
/**
* Check if player is member of a group.
*
* @param world World name
* @param player OfflinePlayer
* @param group Group name
@ -865,7 +939,9 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #playerInGroup(String, OfflinePlayer, String)} instead.
*
* Check if player is member of a group.
*
* @param world World name
* @param player Player name
* @param group Group name
@ -878,7 +954,9 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #playerInGroup(String, OfflinePlayer, String)} instead.
*
* Check if player is member of a group.
*
* @param world World Object
* @param player Player name
* @param group Group name
@ -891,6 +969,7 @@ public abstract class Chat {
/**
* Check if player is member of a group.
*
* @param player Player Object
* @param group Group name
* @return Success or Failure
@ -900,7 +979,8 @@ public abstract class Chat {
}
/**
* Gets the list of groups that this player has
* Gets the list of groups that this player has.
*
* @param world World name
* @param player OfflinePlayer
* @return Array of groups
@ -911,7 +991,9 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerGroups(String, OfflinePlayer)} instead.
* Gets the list of groups that this player has
*
* Gets the list of groups that this player has.
*
* @param world World name
* @param player Player name
* @return Array of groups
@ -923,7 +1005,9 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerGroups(String, OfflinePlayer)} instead.
* Gets the list of groups that this player has
*
* Gets the list of groups that this player has.
*
* @param world World Object
* @param player Player name
* @return Array of groups
@ -934,7 +1018,8 @@ public abstract class Chat {
}
/**
* Gets the list of groups that this player has
* Gets the list of groups that this player has.
*
* @param player Player Object
* @return Array of groups
*/
@ -943,21 +1028,24 @@ public abstract class Chat {
}
/**
* Gets players primary group
* Gets player's primary group.
*
* @param world World name
* @param player OfflinePlayer
* @return Players primary group
* @return Player's primary group
*/
public String getPrimaryGroup(String world, OfflinePlayer player) {
return perms.getPrimaryGroup(world, player);
}
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPrimaryGroup(String, OfflinePlayer)} instead.
* Gets players primary group
* @deprecated As of VaultAPI 1.4 use {{@link #getPrimaryGroup(String, OfflinePlayer)} instead.
*
* Gets player's primary group.
*
* @param world World name
* @param player Player name
* @return Players primary group
* @return Player's primary group
*/
@Deprecated
public String getPrimaryGroup(String world, String player) {
@ -966,10 +1054,12 @@ public abstract class Chat {
/**
* @deprecated As of VaultAPI 1.4 use {{@link #getPrimaryGroup(String, OfflinePlayer)} instead.
* Gets players primary group
*
* Gets player's primary group.
*
* @param world World Object
* @param player Player name
* @return Players primary group
* @return Player's primary group
*/
@Deprecated
public String getPrimaryGroup(World world, String player) {
@ -977,17 +1067,19 @@ public abstract class Chat {
}
/**
* Get players primary group
* Get player's primary group.
*
* @param player Player Object
* @return Players primary group
* @return Player's primary group
*/
public String getPrimaryGroup(Player player) {
return getPrimaryGroup(player.getWorld().getName(), player);
}
/**
* Returns a list of all known groups
* @return an Array of String of all groups
* Returns a list of all known groups.
*
* @return An array of String of all groups
*/
public String[] getGroups() {
return perms.getGroups();

View File

@ -33,7 +33,7 @@ public interface Economy {
public boolean isEnabled();
/**
* Gets name of economy method
* Gets name of economy method.
* @return Name of Economy Method
*/
public String getName();
@ -53,17 +53,17 @@ public interface Economy {
public int fractionalDigits();
/**
* Format amount into a human readable String This provides translation into
* Format amount into a human-readable String. This provides translation into
* economy specific formatting to improve consistency between plugins.
*
* @param amount to format
* @return Human readable string describing amount
* @return Human-readable string describing amount
*/
public String format(double amount);
/**
* Returns the name of the currency in plural form.
* If the economy being used does not support currency names then an empty string will be returned.
* If the economy being used does not support currency names, then an empty string will be returned.
*
* @return name of the currency (plural)
*/
@ -72,7 +72,7 @@ public interface Economy {
/**
* Returns the name of the currency in singular form.
* If the economy being used does not support currency names then an empty string will be returned.
* If the economy being used does not support currency names then, an empty string will be returned.
*
* @return name of the currency (singular)
*/
@ -86,9 +86,9 @@ public interface Economy {
public boolean hasAccount(String playerName);
/**
* Checks if this player has an account on the server yet
* Checks if this player has an account on the server yet.
* This will always return true if the player has joined the server at least once
* as all major economy plugins auto-generate a player account when the player joins the server
* as all major economy plugins auto-generate a player account when the player joins the server.
*
* @param player to check
* @return if the player has an account
@ -102,9 +102,9 @@ public interface Economy {
public boolean hasAccount(String playerName, String worldName);
/**
* Checks if this player has an account on the server yet on the given world
* Checks if this player has an account on the server yet on the given world.
* This will always return true if the player has joined the server at least once
* as all major economy plugins auto-generate a player account when the player joins the server
* as all major economy plugins auto-generate a player account when the player joins the server.
*
* @param player to check in the world
* @param worldName world-specific account
@ -119,7 +119,7 @@ public interface Economy {
public double getBalance(String playerName);
/**
* Gets balance of a player
* Gets balance of a player.
*
* @param player of the player
* @return Amount currently held in players account
@ -148,7 +148,7 @@ public interface Economy {
public boolean has(String playerName, double amount);
/**
* Checks if the player account has the amount - DO NOT USE NEGATIVE AMOUNTS
* Checks if the player account has the amount - DO NOT USE NEGATIVE AMOUNTS.
*
* @param player to check
* @param amount to check for
@ -163,7 +163,7 @@ public interface Economy {
public boolean has(String playerName, String worldName, double amount);
/**
* Checks if the player account has the amount in a given world - DO NOT USE NEGATIVE AMOUNTS
* Checks if the player account has the amount in a given world - DO NOT USE NEGATIVE AMOUNTS.
* IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
*
* @param player to check
@ -180,7 +180,7 @@ public interface Economy {
public EconomyResponse withdrawPlayer(String playerName, double amount);
/**
* Withdraw an amount from a player - DO NOT USE NEGATIVE AMOUNTS
* Withdraw an amount from a player - DO NOT USE NEGATIVE AMOUNTS.
*
* @param player to withdraw from
* @param amount Amount to withdraw
@ -195,7 +195,7 @@ public interface Economy {
public EconomyResponse withdrawPlayer(String playerName, String worldName, double amount);
/**
* Withdraw an amount from a player on a given world - DO NOT USE NEGATIVE AMOUNTS
* Withdraw an amount from a player on a given world - DO NOT USE NEGATIVE AMOUNTS.
* IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
* @param player to withdraw from
* @param worldName - name of the world
@ -211,7 +211,7 @@ public interface Economy {
public EconomyResponse depositPlayer(String playerName, double amount);
/**
* Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTS
* Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTS.
*
* @param player to deposit to
* @param amount Amount to deposit
@ -226,7 +226,7 @@ public interface Economy {
public EconomyResponse depositPlayer(String playerName, String worldName, double amount);
/**
* Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTS
* Deposit an amount to a player - DO NOT USE NEGATIVE AMOUNTS.
* IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
*
* @param player to deposit to
@ -243,7 +243,7 @@ public interface Economy {
public EconomyResponse createBank(String name, String player);
/**
* Creates a bank account with the specified name and the player as the owner
* Creates a bank account with the specified name and the player as the owner.
* @param name of account
* @param player the account should be linked to
* @return EconomyResponse Object
@ -258,14 +258,14 @@ public interface Economy {
public EconomyResponse deleteBank(String name);
/**
* Returns the amount the bank has
* Returns the amount the bank has.
* @param name of the account
* @return EconomyResponse Object
*/
public EconomyResponse bankBalance(String name);
/**
* Returns true or false whether the bank has the amount specified - DO NOT USE NEGATIVE AMOUNTS
* Returns true or false whether the bank has the amount specified - DO NOT USE NEGATIVE AMOUNTS.
*
* @param name of the account
* @param amount to check for
@ -274,7 +274,7 @@ public interface Economy {
public EconomyResponse bankHas(String name, double amount);
/**
* Withdraw an amount from a bank account - DO NOT USE NEGATIVE AMOUNTS
* Withdraw an amount from a bank account - DO NOT USE NEGATIVE AMOUNTS.
*
* @param name of the account
* @param amount to withdraw
@ -283,7 +283,7 @@ public interface Economy {
public EconomyResponse bankWithdraw(String name, double amount);
/**
* Deposit an amount into a bank account - DO NOT USE NEGATIVE AMOUNTS
* Deposit an amount into a bank account - DO NOT USE NEGATIVE AMOUNTS.
*
* @param name of the account
* @param amount to deposit
@ -298,7 +298,7 @@ public interface Economy {
public EconomyResponse isBankOwner(String name, String playerName);
/**
* Check if a player is the owner of a bank account
* Check if a player is the owner of a bank account.
*
* @param name of the account
* @param player to check for ownership
@ -313,7 +313,7 @@ public interface Economy {
public EconomyResponse isBankMember(String name, String playerName);
/**
* Check if the player is a member of the bank account
* Check if the player is a member of the bank account.
*
* @param name of the account
* @param player to check membership
@ -322,7 +322,7 @@ public interface Economy {
public EconomyResponse isBankMember(String name, OfflinePlayer player);
/**
* Gets the list of banks
* Gets the list of banks.
* @return the List of Banks
*/
public List<String> getBanks();
@ -334,7 +334,7 @@ public interface Economy {
public boolean createPlayerAccount(String playerName);
/**
* Attempts to create a player account for the given player
* Attempts to create a player account for the given player.
* @param player OfflinePlayer
* @return if the account creation was successful
*/
@ -347,7 +347,7 @@ public interface Economy {
public boolean createPlayerAccount(String playerName, String worldName);
/**
* Attempts to create a player account for the given player on the specified world
* Attempts to create a player account for the given player on the specified world.
* IMPLEMENTATION SPECIFIC - if an economy plugin does not support this then false will always be returned.
* @param player OfflinePlayer
* @param worldName String name of the world

View File

@ -52,7 +52,7 @@ public class EconomyResponse {
public final double balance;
/**
* Success or failure of call. Using Enum of ResponseType to determine valid
* outcomes
* outcomes.
*/
public final ResponseType type;
/**
@ -61,7 +61,7 @@ public class EconomyResponse {
public final String errorMessage;
/**
* Constructor for EconomyResponse
* Constructor for EconomyResponse.
* @param amount Amount modified during operation
* @param balance New balance of account
* @param type Success or failure type of the operation
@ -75,7 +75,7 @@ public class EconomyResponse {
}
/**
* Checks if an operation was successful
* Checks if an operation was successful.
* @return Value
*/
public boolean transactionSuccess() {

View File

@ -35,7 +35,7 @@ public abstract class Permission {
protected Plugin plugin = null;
/**
* Gets name of permission method
* Gets name of permission method.
* @return Name of Permission Method
*/
abstract public String getName();
@ -76,10 +76,10 @@ public abstract class Permission {
/**
* Checks if a CommandSender has a permission node.
* This will return the result of bukkits, generic .hasPermission() method and is identical in all cases.
* This will return the result of Bukkit's generic .hasPermission() method and is identical in all cases.
* This method will explicitly fail if the registered permission system does not register permissions in bukkit.
*
* For easy checking of a commandsender
* For easy checking of a CommandSender.
* @param sender to check permissions on
* @param permission to check for
* @return true if the sender has the permission
@ -89,7 +89,7 @@ public abstract class Permission {
}
/**
* Checks if player has a permission node. (Short for playerHas(...)
* Checks if player has a permission node. (Short for playerHas(...).
* @param player Player Object
* @param permission Permission node
* @return Success or Failure
@ -118,7 +118,7 @@ public abstract class Permission {
/**
* Checks if player has a permission node.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* May return odd values if the servers registered permission system does not have a global permission store.
*
* @param world String world name
* @param player to check
@ -149,7 +149,7 @@ public abstract class Permission {
* @deprecated As of VaultAPI 1.4 use {@link #playerAdd(String, OfflinePlayer, String)} instead.
* Add permission to a player.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* May return odd values if the servers registered permission system does not have a global permission store.
*
* @param world World name
* @param player Player name
@ -173,7 +173,7 @@ public abstract class Permission {
/**
* Add permission to a player.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* May return odd values if the servers registered permission system does not have a global permission store.
*
* @param world String world name
* @param player to add to
@ -298,8 +298,8 @@ public abstract class Permission {
/**
* Remove permission from a player.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but may return odd values if the servers registered permission system does not have a global permission store.
*
* @param world World name
* @param player OfflinePlayer
@ -315,8 +315,8 @@ public abstract class Permission {
/**
* Remove permission from a player.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but may return odd values if the servers registered permission system does not have a global permission store.
*
* @param world World name
* @param player Player name
@ -381,8 +381,8 @@ public abstract class Permission {
/**
* Checks if group has a permission node.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but may return odd values if the servers registered permission system does not have a global permission store.
*
* @param world World name
* @param group Group name
@ -393,8 +393,8 @@ public abstract class Permission {
/**
* Checks if group has a permission node.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but may return odd values if the servers registered permission system does not have a global permission store.
*
* @param world World Object
* @param group Group name
@ -410,8 +410,8 @@ public abstract class Permission {
/**
* Add permission to a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but may return odd values if the servers registered permission system does not have a global permission store.
*
* @param world World name
* @param group Group name
@ -422,8 +422,8 @@ public abstract class Permission {
/**
* Add permission to a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but may return odd values if the servers registered permission system does not have a global permission store.
*
* @param world World Object
* @param group Group name
@ -439,8 +439,8 @@ public abstract class Permission {
/**
* Remove permission from a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but may return odd values if the servers registered permission system does not have a global permission store.
*
* @param world World name
* @param group Group name
@ -451,8 +451,8 @@ public abstract class Permission {
/**
* Remove permission from a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but may return odd values if the servers registered permission system does not have a global permission store.
*
* @param world World Object
* @param group Group name
@ -485,8 +485,8 @@ public abstract class Permission {
/**
* Check if player is member of a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but may return odd values if the servers registered permission system does not have a global permission store.
*
* @param world World Object
* @param player to check
@ -532,8 +532,8 @@ public abstract class Permission {
/**
* Add player to a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but may return odd values if the servers registered permission system does not have a global permission store.
*
* @param world String world name
* @param player to add
@ -549,7 +549,7 @@ public abstract class Permission {
/**
* Add player to a group.
* This will add a player to the group on the current World. This may return odd results if the permission system
* This will add a player to the group on the current World. This may return odd results if the permission system
* being used on the server does not support world-specific groups, or if the group being added to is a global group.
*
* @param player Player Object
@ -579,8 +579,8 @@ public abstract class Permission {
/**
* Remove player from a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but may return odd values if the servers registered permission system does not have a global permission store.
*
* @param world World Object
* @param player to remove
@ -596,7 +596,7 @@ public abstract class Permission {
/**
* Remove player from a group.
* This will add a player to the group on the current World. This may return odd results if the permission system
* This will add a player to the group on the current World. This may return odd results if the permission system
* being used on the server does not support world-specific groups, or if the group being added to is a global group.
*
* @param player Player Object
@ -626,8 +626,8 @@ public abstract class Permission {
/**
* Gets the list of groups that this player has
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but May return odd values if the servers registered permission system does not have a global permission store.
*
* @param world String world name
* @param player OfflinePlayer
@ -668,8 +668,8 @@ public abstract class Permission {
/**
* Gets players primary group
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
* Supports NULL value for World if the permission system registered supports global permissions,
* but May return odd values if the servers registered permission system does not have a global permission store.
*
* @param world String world name
* @param player to get from