mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-26 18:54:44 +02:00
Heh, API functions shouldn't be static...
This commit is contained in:
@ -14,7 +14,7 @@ public class ExperienceAPI {
|
||||
* @param player The player to check
|
||||
* @param skillType The skill to check
|
||||
*/
|
||||
private static void checkXP(Player player, SkillType skillType) {
|
||||
private void checkXP(Player player, SkillType skillType) {
|
||||
if (skillType.equals(SkillType.ALL)) {
|
||||
Skills.XpCheckAll(player);
|
||||
}
|
||||
@ -32,7 +32,7 @@ public class ExperienceAPI {
|
||||
* @param skillType The skill to add XP to
|
||||
* @param XP The amount of XP to add
|
||||
*/
|
||||
public static void addRawXP(Player player, SkillType skillType, int XP) {
|
||||
public void addRawXP(Player player, SkillType skillType, int XP) {
|
||||
Users.getProfile(player).addXPOverride(skillType, XP);
|
||||
checkXP(player, skillType);
|
||||
}
|
||||
@ -46,7 +46,7 @@ public class ExperienceAPI {
|
||||
* @param skillType The skill to add XP to
|
||||
* @param XP The amount of XP to add
|
||||
*/
|
||||
public static void addMultipliedXP(Player player, SkillType skillType, int XP) {
|
||||
public void addMultipliedXP(Player player, SkillType skillType, int XP) {
|
||||
Users.getProfile(player).addXPOverrideBonus(skillType, XP);
|
||||
checkXP(player, skillType);
|
||||
}
|
||||
@ -60,7 +60,7 @@ public class ExperienceAPI {
|
||||
* @param skillType The skill to add XP to
|
||||
* @param XP The amount of XP to add
|
||||
*/
|
||||
public static void addXP(Player player, SkillType skillType, int XP) {
|
||||
public void addXP(Player player, SkillType skillType, int XP) {
|
||||
Users.getProfile(player).addXP(skillType, XP);
|
||||
checkXP(player, skillType);
|
||||
}
|
||||
@ -74,7 +74,7 @@ public class ExperienceAPI {
|
||||
* @param skillType The skill to get XP for
|
||||
* @return the amount of XP in a given skill
|
||||
*/
|
||||
public static int getXP(Player player, SkillType skillType) {
|
||||
public int getXP(Player player, SkillType skillType) {
|
||||
return Users.getProfile(player).getSkillXpLevel(skillType);
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ public class ExperienceAPI {
|
||||
* @param skillType The skill to get the XP amount for
|
||||
* @return the amount of XP left before leveling up a specifc skill
|
||||
*/
|
||||
public static int getXPToNextLevel(Player player, SkillType skillType) {
|
||||
public int getXPToNextLevel(Player player, SkillType skillType) {
|
||||
return Users.getProfile(player).getXpToLevel(skillType);
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ public class ExperienceAPI {
|
||||
* @param skillType Type of skill to add levels to
|
||||
* @param levels Number of levels to add
|
||||
*/
|
||||
public static void addLevel(Player player, SkillType skillType, int levels) {
|
||||
public void addLevel(Player player, SkillType skillType, int levels) {
|
||||
Users.getProfile(player).addLevels(skillType, levels);
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ public class ExperienceAPI {
|
||||
* @param skillType The skill to get the level for
|
||||
* @return the level of a given skill
|
||||
*/
|
||||
public static int getLevel(Player player, SkillType skillType) {
|
||||
public int getLevel(Player player, SkillType skillType) {
|
||||
return Users.getProfile(player).getSkillLevel(skillType);
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ public class ExperienceAPI {
|
||||
* @param player The player to get the power level for
|
||||
* @return the power level of the player
|
||||
*/
|
||||
public static int getPowerLevel(Player player) {
|
||||
public int getPowerLevel(Player player) {
|
||||
return Users.getProfile(player).getPowerLevel();
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public class PartyAPI {
|
||||
* @param player The player to check the party name of
|
||||
* @return the name of the player's party
|
||||
*/
|
||||
public static String getPartyName(Player player) {
|
||||
public String getPartyName(Player player) {
|
||||
return Users.getProfile(player).getParty();
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ public class PartyAPI {
|
||||
* @param player The player to check
|
||||
* @return true if the player is in a party, false otherwise
|
||||
*/
|
||||
public static boolean inParty(Player player) {
|
||||
public boolean inParty(Player player) {
|
||||
return Users.getProfile(player).inParty();
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ public class PartyAPI {
|
||||
* @param playerb The second player to check
|
||||
* @return true if the two players are in the same party, false otherwise
|
||||
*/
|
||||
public static boolean inSameParty(Player playera, Player playerb) {
|
||||
public boolean inSameParty(Player playera, Player playerb) {
|
||||
return Party.getInstance().inSameParty(playera, playerb);
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ public class PartyAPI {
|
||||
*
|
||||
* @return the list of parties.
|
||||
*/
|
||||
public static ArrayList<String> getParties() {
|
||||
public ArrayList<String> getParties() {
|
||||
String location = "plugins/mcMMO/mcmmo.users";
|
||||
ArrayList<String> parties = new ArrayList<String>();
|
||||
|
||||
@ -96,7 +96,7 @@ public class PartyAPI {
|
||||
* @param player The player to check
|
||||
* @return all the players in the player's party
|
||||
*/
|
||||
public static ArrayList<Player> getPartyMembers(Player player) {
|
||||
public ArrayList<Player> getPartyMembers(Player player) {
|
||||
return Party.getInstance().getPartyMembers(player);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user