This commit is contained in:
Jack 2022-09-16 02:03:48 +00:00 committed by GitHub
commit 6448be2b94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 377 additions and 280 deletions

View File

@ -1,6 +1,6 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd"> http://maven.apache.org/xsd/settings-1.0.0.xsd">
<activeProfiles> <activeProfiles>
@ -25,12 +25,12 @@
</repositories> </repositories>
</profile> </profile>
</profiles> </profiles>
<servers> <servers>
<server> <server>
<id>github</id> <id>github</id>
<username>MilkBowl</username> <username>MilkBowl</username>
<password>${env.GITHUB_TOKEN}</password> <password>${env.GITHUB_TOKEN}</password>
</server> </server>
</servers> </servers>
</settings> </settings>

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
current_dir=`pwd` current_dir=$(pwd)
if [[ "$TRAVIS_REPO_SLUG" != "MilkBowl/VaultAPI" || "$TRAVIS_PULL_REQUEST" == "true" || "$TRAVIS_BRANCH" != "master" ]] if [[ "$TRAVIS_REPO_SLUG" != "MilkBowl/VaultAPI" || "$TRAVIS_PULL_REQUEST" == "true" || "$TRAVIS_BRANCH" != "master" ]]
then then
@ -10,15 +10,15 @@ fi
mvn clean javadoc:javadoc javadoc:jar deploy --settings .utility/settings.xml mvn clean javadoc:javadoc javadoc:jar deploy --settings .utility/settings.xml
# Get to the Travis build directory, configure git and clone the repo # Get to the Travis build directory, configure git and clone the repo
cd $HOME cd "$HOME"
git config --global user.email "travis@travis-ci.org" git config --global user.email "travis@travis-ci.org"
git config --global user.name "travis-ci" git config --global user.name "travis-ci"
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/MilkBowl/VaultAPI gh-pages > /dev/null git clone --quiet --branch=gh-pages https://"${GH_TOKEN}"@github.com/MilkBowl/VaultAPI gh-pages > /dev/null
# Commit and Push the Changes # Commit and Push the Changes
cd gh-pages cd gh-pages
git rm -rf * git rm -rf ./*
cp -Rfv $current_dir/target/javadoc-latest/* ./ cp -Rfv "$current_dir"/target/javadoc-latest/* ./
git add -f . git add -f .
git commit -m "Latest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages" git commit -m "Latest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages"
git push -fq origin gh-pages > /dev/null git push -fq origin gh-pages > /dev/null

View File

@ -6,4 +6,4 @@
<password>${env.DEPLOY_PASS}</password> <password>${env.DEPLOY_PASS}</password>
</server> </server>
</servers> </servers>
</settings> </settings>

198
README.md
View File

@ -1,6 +1,6 @@
# VaultAPI - Abstraction Library API for Bukkit Plugins - [![](https://travis-ci.org/MilkBowl/VaultAPI.svg?branch=master)](https://travis-ci.org/MilkBowl/VaultAPI) # VaultAPI - Abstraction Library API for Bukkit Plugins [![](https://travis-ci.org/MilkBowl/VaultAPI.svg?branch=master)](https://travis-ci.org/MilkBowl/VaultAPI)
How to include the API with Maven: **How to include the API with Maven:**
```xml ```xml
<repositories> <repositories>
<repository> <repository>
@ -8,6 +8,8 @@ How to include the API with Maven:
<url>https://jitpack.io</url> <url>https://jitpack.io</url>
</repository> </repository>
</repositories> </repositories>
```
```xml
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.github.MilkBowl</groupId> <groupId>com.github.MilkBowl</groupId>
@ -18,29 +20,31 @@ How to include the API with Maven:
</dependencies> </dependencies>
``` ```
How to include the API with Gradle: **How to include the API with Gradle:**
```groovy ```groovy
repositories { repositories {
maven { url 'https://jitpack.io' } maven { url 'https://jitpack.io' }
} }
```
```groovy
dependencies { dependencies {
compileOnly "com.github.MilkBowl:VaultAPI:1.7" compileOnly "com.github.MilkBowl:VaultAPI:1.7"
} }
``` ```
**Note**: The VaultAPI version has 2 numbers (major.minor), unlike Vault, which has 3. The 2 numbers in the VaultAPI will always correspond to the 2 beginning numbers in a Vault version to make it clear what versions your plugin will for sure work with. **Note**: The VaultAPI version has 2 numbers (major.minor), unlike Vault, which has 3. The 2 numbers in the VaultAPI will always correspond to the 2 beginning numbers in a Vault version to make it clear what versions your plugin will work with.
## Why Vault? ## Why Vault?
I have no preference which library suits your plugin and development efforts I have no preference which library suits your plugin and development efforts
best. Really, I thought a central suite (rather...Vault) of solutions was the best. Really, I thought a central suite (rather...Vault) of solutions was the
the proper avenue than focusing on a single category of plugin. That's where proper avenue than focusing on a single category of plugin. That's where
the idea for Vault came into play. the idea for Vault came into play.
So, what features do I _think_ you'll like the most? So, what features do I _think_ you'll like the most?
* No need to include my source code in your plugin * No need to include my source code in your plugin
* Broad range of supported plugins * Broad range of supported plugins
* Choice! * Choice!
## License ## License
Copyright (C) 2011-2018 Morgan Humes <morgan@lanaddict.com> Copyright (C) 2011-2018 Morgan Humes <morgan@lanaddict.com>
@ -52,11 +56,11 @@ the Free Software Foundation, either version 3 of the License, or
Vault is distributed in the hope that it will be useful, Vault is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details. GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with Vault. If not, see <http://www.gnu.org/licenses/>. with Vault. If not, see <https://www.gnu.org/licenses/>.
## Building ## Building
VaultAPI comes with all libraries needed to build from the current branch. VaultAPI comes with all libraries needed to build from the current branch.
@ -81,93 +85,93 @@ import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
public class ExamplePlugin extends JavaPlugin { public class ExamplePlugin extends JavaPlugin {
private static final Logger log = Logger.getLogger("Minecraft");
private static Economy econ = null;
private static Permission perms = null;
private static Chat chat = null;
@Override private static final Logger log = Logger.getLogger("Minecraft");
public void onDisable() { private static Economy econ = null;
log.info(String.format("[%s] Disabled Version %s", getDescription().getName(), getDescription().getVersion())); private static Permission perms = null;
} private static Chat chat = null;
@Override @Override
public void onEnable() { public void onDisable() {
if (!setupEconomy() ) { log.info(String.format("[%s] Disabled Version %s", getDescription().getName(), getDescription().getVersion()));
log.severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName())); }
getServer().getPluginManager().disablePlugin(this);
return; @Override
} public void onEnable() {
setupPermissions(); if (!setupEconomy()) {
setupChat(); log.severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
} getServer().getPluginManager().disablePlugin(this);
return;
private boolean setupEconomy() { }
if (getServer().getPluginManager().getPlugin("Vault") == null) { setupPermissions();
return false; setupChat();
} }
RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
if (rsp == null) { private boolean setupEconomy() {
return false; if (getServer().getPluginManager().getPlugin("Vault") == null) {
} return false;
econ = rsp.getProvider(); }
return econ != null; RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
} if (rsp == null) {
return false;
private boolean setupChat() { }
RegisteredServiceProvider<Chat> rsp = getServer().getServicesManager().getRegistration(Chat.class); econ = rsp.getProvider();
chat = rsp.getProvider(); return econ != null;
return chat != null; }
}
private boolean setupChat() {
private boolean setupPermissions() { RegisteredServiceProvider<Chat> rsp = getServer().getServicesManager().getRegistration(Chat.class);
RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class); chat = rsp.getProvider();
perms = rsp.getProvider(); return chat != null;
return perms != null; }
}
private boolean setupPermissions() {
public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) { RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
if(!(sender instanceof Player)) { perms = rsp.getProvider();
log.info("Only players are supported for this Example Plugin, but you should not do this!!!"); return perms != null;
return true; }
}
public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) {
Player player = (Player) sender; if (!(sender instanceof Player)) {
log.info("Only players are supported for this Example Plugin, but you should not do this!!!");
if(command.getLabel().equals("test-economy")) { return true;
// Lets 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); Player player = (Player) sender;
if(r.transactionSuccess()) {
sender.sendMessage(String.format("You were given %s and now have %s", econ.format(r.amount), econ.format(r.balance))); if (command.getLabel().equals("test-economy")) {
} else { // Let's give the player 1.05 currency (note that SOME economic plugins require rounding!)
sender.sendMessage(String.format("An error occured: %s", r.errorMessage)); sender.sendMessage(String.format("You have %s", econ.format(econ.getBalance(player.getName()))));
} EconomyResponse r = econ.depositPlayer(player, 1.05);
return true; if (r.transactionSuccess()) {
} else if(command.getLabel().equals("test-permission")) { sender.sendMessage(String.format("You were given %s and now have %s", econ.format(r.amount), econ.format(r.balance)));
// Lets test if user has the node "example.plugin.awesome" to determine if they are awesome or just suck } else {
if(perms.has(player, "example.plugin.awesome")) { sender.sendMessage(String.format("An error occurred: %s", r.errorMessage));
sender.sendMessage("You are awesome!"); }
} else { return true;
sender.sendMessage("You suck!"); } else if (command.getLabel().equals("test-permission")) {
} // Let's test if user has the node "example.plugin.awesome" to determine if they are awesome or just suck
return true; if (perms.has(player, "example.plugin.awesome")) {
} else { sender.sendMessage("You are awesome!");
return false; } else {
} sender.sendMessage("You suck!");
} }
return true;
public static Economy getEconomy() { } else {
return econ; return false;
} }
}
public static Permission getPermissions() {
return perms; public static Economy getEconomy() {
} return econ;
}
public static Chat getChat() {
return chat; public static Permission getPermissions() {
} return perms;
}
public static Chat getChat() {
return chat;
}
} }
``` ```

View File

@ -162,4 +162,4 @@ General Public License ever published by the Free Software Foundation.
whether future versions of the GNU Lesser General Public License shall whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the permanent authorization for you to choose that version for the
Library. Library.

27
pom.xml
View File

@ -1,5 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.milkbowl.vault</groupId> <groupId>net.milkbowl.vault</groupId>
<artifactId>VaultAPI</artifactId> <artifactId>VaultAPI</artifactId>
@ -8,9 +8,10 @@
<name>VaultAPI</name> <name>VaultAPI</name>
<description>Vault is a Permissions &amp; Economy API to allow plugins to more easily hook into these systems without needing to hook each individual system themselves. <description>Vault is a Permissions &amp; Economy API to allow plugins to more easily hook into these systems without needing to hook each individual system themselves.
Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms, bPerms2, SimplyPerms, DroxPerms, zPermissions, rscPermissions, KPerms, Starburst, iConomy (4/5/6) BOSEconomy *6/7), EssentialsEcon, 3Co, MultiConomy, MineConomy, EconXP, eWallet, CurrencyCore, XPBank, CraftConomy, AEco, SDFEconomy, TAEcon Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms, bPerms2, SimplyPerms, DroxPerms, zPermissions, rscPermissions, KPerms, Starburst, iConomy (4/5/6) BOSEconomy *6/7), EssentialsEcon, 3Co, MultiConomy, MineConomy, EconXP, eWallet, CurrencyCore, XPBank, CraftConomy, AEco, SDFEconomy, TAEcon
</description> </description>
<url>http://dev.bukkit.org/server-mods/vault/</url>
<url>https://dev.bukkit.org/projects/vault</url>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -41,17 +42,17 @@ Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms
<repositories> <repositories>
<repository> <repository>
<id>spigot-repo</id> <id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url> <url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository> </repository>
</repositories> </repositories>
<distributionManagement> <distributionManagement>
<repository> <repository>
<id>github</id> <id>github</id>
<name>GitHub Packages</name> <name>GitHub Packages</name>
<url>https://maven.pkg.github.com/milkbowl/github-releases</url> <url>https://maven.pkg.github.com/milkbowl/github-releases</url>
</repository> </repository>
</distributionManagement> </distributionManagement>
<dependencies> <dependencies>
@ -93,8 +94,8 @@ Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms
<id>attach-sources</id> <id>attach-sources</id>
<phase>verify</phase> <phase>verify</phase>
<goals> <goals>
<goal>jar-no-fork</goal> <goal>jar-no-fork</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>

View File

@ -33,13 +33,15 @@ public abstract class Chat {
this.perms = perms; this.perms = perms;
} }
/** /**
* Gets name of permission method * Gets name of permission method.
*
* @return Name of Permission Method * @return Name of Permission Method
*/ */
abstract public String getName(); abstract public String getName();
/** /**
* Checks if permission method is enabled. * Checks if permission method is enabled.
*
* @return Success or Failure * @return Success or Failure
*/ */
abstract public boolean isEnabled(); abstract public boolean isEnabled();
@ -47,7 +49,8 @@ public abstract class Chat {
/** /**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerPrefix(String, OfflinePlayer)} instead. * @deprecated As of VaultAPI 1.4 use {{@link #getPlayerPrefix(String, OfflinePlayer)} instead.
* *
* Get players prefix * Get player's prefix.
*
* @param world World name * @param world World name
* @param player Player name * @param player Player name
* @return Prefix * @return Prefix
@ -56,8 +59,8 @@ public abstract class Chat {
abstract public String getPlayerPrefix(String world, String player); abstract public String getPlayerPrefix(String world, String player);
/** /**
* Get a players prefix in the given world * Get a player's prefix in the given world.
* Use NULL for world if requesting a global prefix * Use NULL for world if requesting a global prefix.
* *
* @param world World name * @param world World name
* @param player OfflinePlayer * @param player OfflinePlayer
@ -70,7 +73,8 @@ public abstract class Chat {
/** /**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerPrefix(String, OfflinePlayer)} instead. * @deprecated As of VaultAPI 1.4 use {{@link #getPlayerPrefix(String, OfflinePlayer)} instead.
* *
* Get players prefix * Get player's prefix.
*
* @param world World Object * @param world World Object
* @param player Player name * @param player Player name
* @return Prefix * @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. * May or may not return the global prefix depending on implementation.
* *
* @param player Player Object * @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. * @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 world World name
* @param player Player name * @param player Player name
* @param prefix Prefix * @param prefix Prefix
@ -103,7 +108,7 @@ public abstract class Chat {
abstract public void setPlayerPrefix(String world, String player, String prefix); 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. * Use NULL for world for setting in the Global scope.
* *
* @param world World name * @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. * @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 world World Object
* @param player Player name * @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 player Player Object
* @param prefix Prefix * @param prefix Prefix
@ -141,7 +146,8 @@ public abstract class Chat {
/** /**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerSuffix(String, OfflinePlayer)} instead. * @deprecated As of VaultAPI 1.4 use {{@link #getPlayerSuffix(String, OfflinePlayer)} instead.
* *
* Get players suffix * Get player's suffix.
*
* @param world World name * @param world World name
* @param player Player name * @param player Player name
* @return Suffix * @return Suffix
@ -150,7 +156,7 @@ public abstract class Chat {
abstract public String getPlayerSuffix(String world, String player); 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 world World name
* @param player OfflinePlayer 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. * @deprecated As of VaultAPI 1.4 use {{@link #getPlayerSuffix(String, OfflinePlayer)} instead.
* *
* Get players suffix * Get player's suffix.
*
* @param world World Object * @param world World Object
* @param player Player name * @param player Player name
* @return Suffix * @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 * @param player Player Object
* @return Suffix * @return Suffix
@ -186,7 +193,8 @@ public abstract class Chat {
/** /**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerSuffix(String, OfflinePlayer, String)} instead. * @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 world World name
* @param player Player name * @param player Player name
* @param suffix Suffix * @param suffix Suffix
@ -195,7 +203,7 @@ public abstract class Chat {
abstract public void setPlayerSuffix(String world, String player, String suffix); 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 world World name
* @param player OfflinePlayer * @param player OfflinePlayer
@ -208,7 +216,8 @@ public abstract class Chat {
/** /**
* @deprecated As of VaultAPI 1.4 use {{@link #setPlayerSuffix(String, OfflinePlayer, String)} instead. * @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 world World Object
* @param player Player name * @param player Player name
* @param suffix Suffix * @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 player Player Object
* @param suffix Suffix * @param suffix Suffix
@ -229,7 +238,8 @@ public abstract class Chat {
} }
/** /**
* Get group prefix * Get group prefix.
*
* @param world World name * @param world World name
* @param group Group name * @param group Group name
* @return Prefix * @return Prefix
@ -237,7 +247,8 @@ public abstract class Chat {
abstract public String getGroupPrefix(String world, String group); abstract public String getGroupPrefix(String world, String group);
/** /**
* Get group prefix * Get group prefix.
*
* @param world World Object * @param world World Object
* @param group Group name * @param group Group name
* @return Prefix * @return Prefix
@ -247,7 +258,8 @@ public abstract class Chat {
} }
/** /**
* Set group prefix * Set group prefix.
*
* @param world World name * @param world World name
* @param group Group name * @param group Group name
* @param prefix Prefix * @param prefix Prefix
@ -255,7 +267,8 @@ public abstract class Chat {
abstract public void setGroupPrefix(String world, String group, String prefix); abstract public void setGroupPrefix(String world, String group, String prefix);
/** /**
* Set group prefix * Set group prefix.
*
* @param world World Object * @param world World Object
* @param group Group name * @param group Group name
* @param prefix Prefix * @param prefix Prefix
@ -265,7 +278,8 @@ public abstract class Chat {
} }
/** /**
* Get group suffix * Get group suffix.
*
* @param world World name * @param world World name
* @param group Group name * @param group Group name
* @return Suffix * @return Suffix
@ -273,7 +287,8 @@ public abstract class Chat {
abstract public String getGroupSuffix(String world, String group); abstract public String getGroupSuffix(String world, String group);
/** /**
* Get group suffix * Get group suffix.
*
* @param world World Object * @param world World Object
* @param group Group name * @param group Group name
* @return Suffix * @return Suffix
@ -283,7 +298,8 @@ public abstract class Chat {
} }
/** /**
* Set group suffix * Set group suffix.
*
* @param world World name * @param world World name
* @param group Group name * @param group Group name
* @param suffix Suffix * @param suffix Suffix
@ -291,7 +307,8 @@ public abstract class Chat {
abstract public void setGroupSuffix(String world, String group, String suffix); abstract public void setGroupSuffix(String world, String group, String suffix);
/** /**
* Set group suffix * Set group suffix.
*
* @param world World Object * @param world World Object
* @param group Group name * @param group Group name
* @param suffix Suffix * @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 world World name
* @param player OfflinePlayer * @param player OfflinePlayer
* @param node Permission node * @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. * @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 world World name
* @param player Player name * @param player Player name
* @param node Permission node * @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. * @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 world World Object
* @param player Player name * @param player Player name
* @param node Permission node * @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 player Player Object
* @param node Permission node * @param node Permission node
* @param defaultValue Default value * @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 world World name
* @param player OfflinePlayer * @param player OfflinePlayer
* @param node Permission node * @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. * @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 world World name
* @param player Player name * @param player Player name
* @param node Permission node * @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. * @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 world World Object
* @param player Player name * @param player Player name
* @param node Permission node * @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 player Player Object
* @param node Permission node * @param node Permission node
* @param value Value to set * @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 world World name
* @param group Group name * @param group Group name
* @param node Permission node * @param node Permission node
@ -408,7 +435,8 @@ public abstract class Chat {
abstract public int getGroupInfoInteger(String world, String group, String node, int defaultValue); 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 world World Object
* @param group Group name * @param group Group name
* @param node Permission node * @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 world World name
* @param group Group name * @param group Group name
* @param node Permission node * @param node Permission node
@ -429,7 +458,8 @@ public abstract class Chat {
abstract public void setGroupInfoInteger(String world, String group, String node, int value); 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 world World Object
* @param group Group name * @param group Group name
* @param node Permission node * @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 world World name
* @param player OfflinePlayer * @param player OfflinePlayer
* @param node Permission node * @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. * @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 world World name
* @param player Player name * @param player Player name
* @param node Permission node * @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 * @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 world World Object
* @param player Player name * @param player Player name
* @param node Permission node * @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 player Player Object
* @param node Permission node * @param node Permission node
* @param defaultValue Default value * @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 world World name
* @param player OfflinePlayer * @param player OfflinePlayer
* @param node Permission node * @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. * @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 world World name
* @param player Player name * @param player Player name
* @param node Permission node * @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. * @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 world World Object
* @param player Player name * @param player Player name
* @param node Permission node * @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 player Player Object
* @param node Permission node * @param node Permission node
* @param value Value to set * @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 world World name
* @param group Group name * @param group Group name
* @param node Permission node * @param node Permission node
@ -546,7 +587,8 @@ public abstract class Chat {
abstract public double getGroupInfoDouble(String world, String group, String node, double defaultValue); 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 world World Object
* @param group Group name * @param group Group name
* @param node Permission node * @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 world World name
* @param group Group name * @param group Group name
* @param node Permission node * @param node Permission node
@ -567,7 +610,8 @@ public abstract class Chat {
abstract public void setGroupInfoDouble(String world, String group, String node, double value); 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 world World Object
* @param group Group name * @param group Group name
* @param node Permission node * @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 world World name
* @param player OfflinePlayer * @param player OfflinePlayer
* @param node Permission node * @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. * @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 world World name
* @param player Player name * @param player Player name
* @param node Permission node * @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. * @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 world World Object
* @param player Player name * @param player Player name
* @param node Permission node * @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 player Player Object
* @param node Permission node * @param node Permission node
* @param defaultValue Default value * @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 world World name
* @param player OfflinePlayer * @param player OfflinePlayer
* @param node Permission node * @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. * @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 world World name
* @param player Player name * @param player Player name
* @param node Permission node * @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. * @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 world World Object
* @param player Player name * @param player Player name
* @param node Permission node * @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 player Player Object
* @param node Permission node * @param node Permission node
* @param value Value to set * @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 world Name of World
* @param group Name of Group * @param group Name of Group
* @param node Permission node * @param node Permission node
@ -684,7 +739,8 @@ public abstract class Chat {
abstract public boolean getGroupInfoBoolean(String world, String group, String node, boolean defaultValue); 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 world World Object
* @param group Group name * @param group Group name
* @param node Permission node * @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 world World name
* @param group Group name * @param group Group name
* @param node Permission node * @param node Permission node
@ -705,7 +762,8 @@ public abstract class Chat {
abstract public void setGroupInfoBoolean(String world, String group, String node, boolean value); 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 world World Object
* @param group Group name * @param group Group name
* @param node Permission node * @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 world World name
* @param player OfflinePlayer * @param player OfflinePlayer
* @param node Permission node * @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. * @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 world World name
* @param player Player name * @param player Player name
* @param node Permission node * @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. * @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 world World Object
* @param player Player name * @param player Player name
* @param node Permission node * @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 player Player Object
* @param node Permission node * @param node Permission node
* @param defaultValue Default value * @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 world World name
* @param player OfflinePlayer * @param player OfflinePlayer
* @param node Permission node * @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. * @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 world World name
* @param player Player name * @param player Player name
* @param node Permission node * @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. * @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 world World name
* @param player Player name * @param player Player name
* @param node Permission node * @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 player Player Object
* @param node Permission node * @param node Permission node
* @param value Value ot set * @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 world Name of World
* @param group Name of Group * @param group Name of Group
* @param node Permission node * @param node Permission node
@ -821,7 +891,8 @@ public abstract class Chat {
abstract public String getGroupInfoString(String world, String group, String node, String defaultValue); 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 world World Object
* @param group Group name * @param group Group name
* @param node Permission node * @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 world World name
* @param group Group name * @param group Group name
* @param node Permission node * @param node Permission node
@ -842,7 +914,8 @@ public abstract class Chat {
abstract public void setGroupInfoString(String world, String group, String node, String value); 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 world World name
* @param group Group name * @param group Group name
* @param node Permission node * @param node Permission node
@ -854,6 +927,7 @@ public abstract class Chat {
/** /**
* Check if player is member of a group. * Check if player is member of a group.
*
* @param world World name * @param world World name
* @param player OfflinePlayer * @param player OfflinePlayer
* @param group Group name * @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. * @deprecated As of VaultAPI 1.4 use {{@link #playerInGroup(String, OfflinePlayer, String)} instead.
*
* Check if player is member of a group. * Check if player is member of a group.
*
* @param world World name * @param world World name
* @param player Player name * @param player Player name
* @param group Group 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. * @deprecated As of VaultAPI 1.4 use {{@link #playerInGroup(String, OfflinePlayer, String)} instead.
*
* Check if player is member of a group. * Check if player is member of a group.
*
* @param world World Object * @param world World Object
* @param player Player name * @param player Player name
* @param group Group name * @param group Group name
@ -891,6 +969,7 @@ public abstract class Chat {
/** /**
* Check if player is member of a group. * Check if player is member of a group.
*
* @param player Player Object * @param player Player Object
* @param group Group name * @param group Group name
* @return Success or Failure * @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 world World name
* @param player OfflinePlayer * @param player OfflinePlayer
* @return Array of groups * @return Array of groups
@ -911,7 +991,9 @@ public abstract class Chat {
/** /**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerGroups(String, OfflinePlayer)} instead. * @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 world World name
* @param player Player name * @param player Player name
* @return Array of groups * @return Array of groups
@ -923,7 +1005,9 @@ public abstract class Chat {
/** /**
* @deprecated As of VaultAPI 1.4 use {{@link #getPlayerGroups(String, OfflinePlayer)} instead. * @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 world World Object
* @param player Player name * @param player Player name
* @return Array of groups * @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 * @param player Player Object
* @return Array of groups * @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 world World name
* @param player OfflinePlayer * @param player OfflinePlayer
* @return Players primary group * @return Player's primary group
*/ */
public String getPrimaryGroup(String world, OfflinePlayer player) { public String getPrimaryGroup(String world, OfflinePlayer player) {
return perms.getPrimaryGroup(world, player); return perms.getPrimaryGroup(world, player);
} }
/** /**
* @deprecated As of VaultAPI 1.4 use {{@link #getPrimaryGroup(String, OfflinePlayer)} instead. * @deprecated As of VaultAPI 1.4 use {{@link #getPrimaryGroup(String, OfflinePlayer)} instead.
* Gets players primary group *
* Gets player's primary group.
*
* @param world World name * @param world World name
* @param player Player name * @param player Player name
* @return Players primary group * @return Player's primary group
*/ */
@Deprecated @Deprecated
public String getPrimaryGroup(String world, String player) { 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. * @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 world World Object
* @param player Player name * @param player Player name
* @return Players primary group * @return Player's primary group
*/ */
@Deprecated @Deprecated
public String getPrimaryGroup(World world, String player) { 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 * @param player Player Object
* @return Players primary group * @return Player's primary group
*/ */
public String getPrimaryGroup(Player player) { public String getPrimaryGroup(Player player) {
return getPrimaryGroup(player.getWorld().getName(), player); return getPrimaryGroup(player.getWorld().getName(), player);
} }
/** /**
* Returns a list of all known groups * Returns a list of all known groups.
* @return an Array of String of all groups *
* @return An array of String of all groups
*/ */
public String[] getGroups() { public String[] getGroups() {
return perms.getGroups(); return perms.getGroups();

View File

@ -33,7 +33,7 @@ public interface Economy {
public boolean isEnabled(); public boolean isEnabled();
/** /**
* Gets name of economy method * Gets name of economy method.
* @return Name of Economy Method * @return Name of Economy Method
*/ */
public String getName(); public String getName();
@ -53,17 +53,17 @@ public interface Economy {
public int fractionalDigits(); 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. * economy specific formatting to improve consistency between plugins.
* *
* @param amount to format * @param amount to format
* @return Human readable string describing amount * @return Human-readable string describing amount
*/ */
public String format(double amount); public String format(double amount);
/** /**
* Returns the name of the currency in plural form. * 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) * @return name of the currency (plural)
*/ */
@ -72,7 +72,7 @@ public interface Economy {
/** /**
* Returns the name of the currency in singular form. * 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) * @return name of the currency (singular)
*/ */
@ -86,9 +86,9 @@ public interface Economy {
public boolean hasAccount(String playerName); 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 * 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 * @param player to check
* @return if the player has an account * @return if the player has an account
@ -102,9 +102,9 @@ public interface Economy {
public boolean hasAccount(String playerName, String worldName); 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 * 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 player to check in the world
* @param worldName world-specific account * @param worldName world-specific account
@ -119,7 +119,7 @@ public interface Economy {
public double getBalance(String playerName); public double getBalance(String playerName);
/** /**
* Gets balance of a player * Gets balance of a player.
* *
* @param player of the player * @param player of the player
* @return Amount currently held in players account * @return Amount currently held in players account
@ -148,7 +148,7 @@ public interface Economy {
public boolean has(String playerName, double amount); 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 player to check
* @param amount to check for * @param amount to check for
@ -163,7 +163,7 @@ public interface Economy {
public boolean has(String playerName, String worldName, double amount); 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. * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
* *
* @param player to check * @param player to check
@ -180,7 +180,7 @@ public interface Economy {
public EconomyResponse withdrawPlayer(String playerName, double amount); 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 player to withdraw from
* @param amount Amount to withdraw * @param amount Amount to withdraw
@ -195,7 +195,7 @@ public interface Economy {
public EconomyResponse withdrawPlayer(String playerName, String worldName, double amount); 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. * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
* @param player to withdraw from * @param player to withdraw from
* @param worldName - name of the world * @param worldName - name of the world
@ -211,7 +211,7 @@ public interface Economy {
public EconomyResponse depositPlayer(String playerName, double amount); 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 player to deposit to
* @param amount Amount to deposit * @param amount Amount to deposit
@ -226,7 +226,7 @@ public interface Economy {
public EconomyResponse depositPlayer(String playerName, String worldName, double amount); 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. * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
* *
* @param player to deposit to * @param player to deposit to
@ -243,7 +243,7 @@ public interface Economy {
public EconomyResponse createBank(String name, String player); 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 name of account
* @param player the account should be linked to * @param player the account should be linked to
* @return EconomyResponse Object * @return EconomyResponse Object
@ -258,14 +258,14 @@ public interface Economy {
public EconomyResponse deleteBank(String name); public EconomyResponse deleteBank(String name);
/** /**
* Returns the amount the bank has * Returns the amount the bank has.
* @param name of the account * @param name of the account
* @return EconomyResponse Object * @return EconomyResponse Object
*/ */
public EconomyResponse bankBalance(String name); 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 name of the account
* @param amount to check for * @param amount to check for
@ -274,7 +274,7 @@ public interface Economy {
public EconomyResponse bankHas(String name, double amount); 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 name of the account
* @param amount to withdraw * @param amount to withdraw
@ -283,7 +283,7 @@ public interface Economy {
public EconomyResponse bankWithdraw(String name, double amount); 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 name of the account
* @param amount to deposit * @param amount to deposit
@ -298,7 +298,7 @@ public interface Economy {
public EconomyResponse isBankOwner(String name, String playerName); 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 name of the account
* @param player to check for ownership * @param player to check for ownership
@ -313,7 +313,7 @@ public interface Economy {
public EconomyResponse isBankMember(String name, String playerName); 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 name of the account
* @param player to check membership * @param player to check membership
@ -322,7 +322,7 @@ public interface Economy {
public EconomyResponse isBankMember(String name, OfflinePlayer player); public EconomyResponse isBankMember(String name, OfflinePlayer player);
/** /**
* Gets the list of banks * Gets the list of banks.
* @return the List of Banks * @return the List of Banks
*/ */
public List<String> getBanks(); public List<String> getBanks();
@ -334,7 +334,7 @@ public interface Economy {
public boolean createPlayerAccount(String playerName); 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 * @param player OfflinePlayer
* @return if the account creation was successful * @return if the account creation was successful
*/ */
@ -347,7 +347,7 @@ public interface Economy {
public boolean createPlayerAccount(String playerName, String worldName); 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. * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this then false will always be returned.
* @param player OfflinePlayer * @param player OfflinePlayer
* @param worldName String name of the world * @param worldName String name of the world

View File

@ -52,7 +52,7 @@ public class EconomyResponse {
public final double balance; public final double balance;
/** /**
* Success or failure of call. Using Enum of ResponseType to determine valid * Success or failure of call. Using Enum of ResponseType to determine valid
* outcomes * outcomes.
*/ */
public final ResponseType type; public final ResponseType type;
/** /**
@ -61,7 +61,7 @@ public class EconomyResponse {
public final String errorMessage; public final String errorMessage;
/** /**
* Constructor for EconomyResponse * Constructor for EconomyResponse.
* @param amount Amount modified during operation * @param amount Amount modified during operation
* @param balance New balance of account * @param balance New balance of account
* @param type Success or failure type of the operation * @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 * @return Value
*/ */
public boolean transactionSuccess() { public boolean transactionSuccess() {

View File

@ -35,7 +35,7 @@ public abstract class Permission {
protected Plugin plugin = null; protected Plugin plugin = null;
/** /**
* Gets name of permission method * Gets name of permission method.
* @return Name of Permission Method * @return Name of Permission Method
*/ */
abstract public String getName(); abstract public String getName();
@ -76,10 +76,10 @@ public abstract class Permission {
/** /**
* Checks if a CommandSender has a permission node. * 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. * 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 sender to check permissions on
* @param permission to check for * @param permission to check for
* @return true if the sender has the permission * @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 player Player Object
* @param permission Permission node * @param permission Permission node
* @return Success or Failure * @return Success or Failure
@ -118,7 +118,7 @@ public abstract class Permission {
/** /**
* Checks if player has a permission node. * Checks if player has a permission node.
* Supports NULL value for World if the permission system registered supports global permissions. * 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 world String world name
* @param player to check * @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. * @deprecated As of VaultAPI 1.4 use {@link #playerAdd(String, OfflinePlayer, String)} instead.
* Add permission to a player. * Add permission to a player.
* Supports NULL value for World if the permission system registered supports global permissions. * 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 world World name
* @param player Player name * @param player Player name
@ -173,7 +173,7 @@ public abstract class Permission {
/** /**
* Add permission to a player. * Add permission to a player.
* Supports NULL value for World if the permission system registered supports global permissions. * 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 world String world name
* @param player to add to * @param player to add to
@ -298,8 +298,8 @@ public abstract class Permission {
/** /**
* Remove permission from a player. * Remove permission from a player.
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but may return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world World name * @param world World name
* @param player OfflinePlayer * @param player OfflinePlayer
@ -315,8 +315,8 @@ public abstract class Permission {
/** /**
* Remove permission from a player. * Remove permission from a player.
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but may return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world World name * @param world World name
* @param player Player name * @param player Player name
@ -381,8 +381,8 @@ public abstract class Permission {
/** /**
* Checks if group has a permission node. * Checks if group has a permission node.
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but may return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world World name * @param world World name
* @param group Group name * @param group Group name
@ -393,8 +393,8 @@ public abstract class Permission {
/** /**
* Checks if group has a permission node. * Checks if group has a permission node.
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but may return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world World Object * @param world World Object
* @param group Group name * @param group Group name
@ -410,8 +410,8 @@ public abstract class Permission {
/** /**
* Add permission to a group. * Add permission to a group.
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but may return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world World name * @param world World name
* @param group Group name * @param group Group name
@ -422,8 +422,8 @@ public abstract class Permission {
/** /**
* Add permission to a group. * Add permission to a group.
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but may return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world World Object * @param world World Object
* @param group Group name * @param group Group name
@ -439,8 +439,8 @@ public abstract class Permission {
/** /**
* Remove permission from a group. * Remove permission from a group.
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but may return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world World name * @param world World name
* @param group Group name * @param group Group name
@ -451,8 +451,8 @@ public abstract class Permission {
/** /**
* Remove permission from a group. * Remove permission from a group.
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but may return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world World Object * @param world World Object
* @param group Group name * @param group Group name
@ -485,8 +485,8 @@ public abstract class Permission {
/** /**
* Check if player is member of a group. * Check if player is member of a group.
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but may return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world World Object * @param world World Object
* @param player to check * @param player to check
@ -532,8 +532,8 @@ public abstract class Permission {
/** /**
* Add player to a group. * Add player to a group.
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but may return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world String world name * @param world String world name
* @param player to add * @param player to add
@ -549,7 +549,7 @@ public abstract class Permission {
/** /**
* Add player to a group. * 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. * 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 * @param player Player Object
@ -579,8 +579,8 @@ public abstract class Permission {
/** /**
* Remove player from a group. * Remove player from a group.
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but may return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world World Object * @param world World Object
* @param player to remove * @param player to remove
@ -596,7 +596,7 @@ public abstract class Permission {
/** /**
* Remove player from a group. * 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. * 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 * @param player Player Object
@ -626,8 +626,8 @@ public abstract class Permission {
/** /**
* Gets the list of groups that this player has * Gets the list of groups that this player has
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but May return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world String world name * @param world String world name
* @param player OfflinePlayer * @param player OfflinePlayer
@ -668,8 +668,8 @@ public abstract class Permission {
/** /**
* Gets players primary group * Gets players primary group
* Supports NULL value for World if the permission system registered supports global permissions. * 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. * but May return odd values if the servers registered permission system does not have a global permission store.
* *
* @param world String world name * @param world String world name
* @param player to get from * @param player to get from
@ -702,4 +702,4 @@ public abstract class Permission {
* @return true if the implementation supports groups * @return true if the implementation supports groups
*/ */
abstract public boolean hasGroupSupport(); abstract public boolean hasGroupSupport();
} }