mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 22:26:46 +01:00
Use OnlineMMOPlayer over McMMOPlayer
This commit is contained in:
parent
573d9d014e
commit
b7f713a50f
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.api;
|
package com.gmail.nossr50.api;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
|
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
|
||||||
@ -39,7 +39,7 @@ public final class AbilityAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isAnyAbilityEnabled(Player player) {
|
public static boolean isAnyAbilityEnabled(Player player) {
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
for (SuperAbilityType ability : SuperAbilityType.values()) {
|
for (SuperAbilityType ability : SuperAbilityType.values()) {
|
||||||
if (mmoPlayer.getSuperAbilityManager().getAbilityMode(ability)) {
|
if (mmoPlayer.getSuperAbilityManager().getAbilityMode(ability)) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.api;
|
package com.gmail.nossr50.api;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@ -16,11 +16,11 @@ public final class ChatAPI {
|
|||||||
*
|
*
|
||||||
* @param player target player
|
* @param player target player
|
||||||
* @return true if the player is targeting the party chat channel
|
* @return true if the player is targeting the party chat channel
|
||||||
* @deprecated Use {@link #isUsingPartyChat(McMMOPlayer)} instead
|
* @deprecated Use {@link #isUsingPartyChat(OnlineMMOPlayer)} instead
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static boolean isUsingPartyChat(@NotNull Player player) {
|
public static boolean isUsingPartyChat(@NotNull Player player) {
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if(mmoPlayer != null)
|
if(mmoPlayer != null)
|
||||||
return mmoPlayer.getChatChannel() == ChatChannel.PARTY;
|
return mmoPlayer.getChatChannel() == ChatChannel.PARTY;
|
||||||
@ -29,12 +29,12 @@ public final class ChatAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a {@link McMMOPlayer} is in the Party chat channel
|
* Check if a {@link OnlineMMOPlayer} is in the Party chat channel
|
||||||
*
|
*
|
||||||
* @param mmoPlayer target player
|
* @param mmoPlayer target player
|
||||||
* @return true if the player is targeting the party chat channel
|
* @return true if the player is targeting the party chat channel
|
||||||
*/
|
*/
|
||||||
public static boolean isUsingPartyChat(@NotNull McMMOPlayer mmoPlayer) {
|
public static boolean isUsingPartyChat(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
return mmoPlayer.getChatChannel() == ChatChannel.PARTY;
|
return mmoPlayer.getChatChannel() == ChatChannel.PARTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ public final class ChatAPI {
|
|||||||
*
|
*
|
||||||
* @param playerName The name of the player to check
|
* @param playerName The name of the player to check
|
||||||
* @return true if the player is using party chat, false otherwise
|
* @return true if the player is using party chat, false otherwise
|
||||||
* @deprecated use {@link #isUsingPartyChat(McMMOPlayer)} instead for performance reasons
|
* @deprecated use {@link #isUsingPartyChat(OnlineMMOPlayer)} instead for performance reasons
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static boolean isUsingPartyChat(String playerName) {
|
public static boolean isUsingPartyChat(String playerName) {
|
||||||
@ -59,11 +59,11 @@ public final class ChatAPI {
|
|||||||
*
|
*
|
||||||
* @param player target player
|
* @param player target player
|
||||||
* @return true if the player is targeting the admin chat channel
|
* @return true if the player is targeting the admin chat channel
|
||||||
* @deprecated Use {@link #isUsingAdminChat(McMMOPlayer)} instead
|
* @deprecated Use {@link #isUsingAdminChat(OnlineMMOPlayer)} instead
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static boolean isUsingAdminChat(@NotNull Player player) {
|
public static boolean isUsingAdminChat(@NotNull Player player) {
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if(mmoPlayer != null)
|
if(mmoPlayer != null)
|
||||||
return mmoPlayer.getChatChannel() == ChatChannel.ADMIN;
|
return mmoPlayer.getChatChannel() == ChatChannel.ADMIN;
|
||||||
@ -72,12 +72,12 @@ public final class ChatAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a {@link McMMOPlayer} is in the Admin chat channel
|
* Check if a {@link OnlineMMOPlayer} is in the Admin chat channel
|
||||||
*
|
*
|
||||||
* @param mmoPlayer target player
|
* @param mmoPlayer target player
|
||||||
* @return true if the player is targeting the admin chat channel
|
* @return true if the player is targeting the admin chat channel
|
||||||
*/
|
*/
|
||||||
public static boolean isUsingAdminChat(@NotNull McMMOPlayer mmoPlayer) {
|
public static boolean isUsingAdminChat(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
return mmoPlayer.getChatChannel() == ChatChannel.ADMIN;
|
return mmoPlayer.getChatChannel() == ChatChannel.ADMIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ public final class ChatAPI {
|
|||||||
*
|
*
|
||||||
* @param playerName The name of the player to check
|
* @param playerName The name of the player to check
|
||||||
* @return true if the player is using admin chat, false otherwise
|
* @return true if the player is using admin chat, false otherwise
|
||||||
* @deprecated use {@link #isUsingAdminChat(McMMOPlayer)} instead for performance reasons
|
* @deprecated use {@link #isUsingAdminChat(OnlineMMOPlayer)} instead for performance reasons
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static boolean isUsingAdminChat(String playerName) {
|
public static boolean isUsingAdminChat(String playerName) {
|
||||||
@ -98,11 +98,11 @@ public final class ChatAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle the party chat channel of a {@link McMMOPlayer}
|
* Toggle the party chat channel of a {@link OnlineMMOPlayer}
|
||||||
*
|
*
|
||||||
* @param mmoPlayer The player to toggle party chat on.
|
* @param mmoPlayer The player to toggle party chat on.
|
||||||
*/
|
*/
|
||||||
public static void togglePartyChat(@NotNull McMMOPlayer mmoPlayer) {
|
public static void togglePartyChat(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
mcMMO.p.getChatManager().setOrToggleChatChannel(mmoPlayer, ChatChannel.PARTY);
|
mcMMO.p.getChatManager().setOrToggleChatChannel(mmoPlayer, ChatChannel.PARTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ public final class ChatAPI {
|
|||||||
* Toggle the party chat mode of a player.
|
* Toggle the party chat mode of a player.
|
||||||
*
|
*
|
||||||
* @param player The player to toggle party chat on.
|
* @param player The player to toggle party chat on.
|
||||||
* @deprecated use {@link #togglePartyChat(McMMOPlayer)}
|
* @deprecated use {@link #togglePartyChat(OnlineMMOPlayer)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static void togglePartyChat(Player player) throws NullPointerException {
|
public static void togglePartyChat(Player player) throws NullPointerException {
|
||||||
@ -121,7 +121,7 @@ public final class ChatAPI {
|
|||||||
* Toggle the party chat mode of a player.
|
* Toggle the party chat mode of a player.
|
||||||
*
|
*
|
||||||
* @param playerName The name of the player to toggle party chat on.
|
* @param playerName The name of the player to toggle party chat on.
|
||||||
* @deprecated Use {@link #togglePartyChat(McMMOPlayer)} instead
|
* @deprecated Use {@link #togglePartyChat(OnlineMMOPlayer)} instead
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static void togglePartyChat(String playerName) throws NullPointerException {
|
public static void togglePartyChat(String playerName) throws NullPointerException {
|
||||||
@ -129,11 +129,11 @@ public final class ChatAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle the admin chat channel of a {@link McMMOPlayer}
|
* Toggle the admin chat channel of a {@link OnlineMMOPlayer}
|
||||||
*
|
*
|
||||||
* @param mmoPlayer The player to toggle admin chat on.
|
* @param mmoPlayer The player to toggle admin chat on.
|
||||||
*/
|
*/
|
||||||
public static void toggleAdminChat(@NotNull McMMOPlayer mmoPlayer) {
|
public static void toggleAdminChat(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
mcMMO.p.getChatManager().setOrToggleChatChannel(mmoPlayer, ChatChannel.ADMIN);
|
mcMMO.p.getChatManager().setOrToggleChatChannel(mmoPlayer, ChatChannel.ADMIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ public final class ChatAPI {
|
|||||||
* Toggle the admin chat mode of a player.
|
* Toggle the admin chat mode of a player.
|
||||||
*
|
*
|
||||||
* @param player The player to toggle admin chat on.
|
* @param player The player to toggle admin chat on.
|
||||||
* @deprecated Use {@link #toggleAdminChat(McMMOPlayer)} instead
|
* @deprecated Use {@link #toggleAdminChat(OnlineMMOPlayer)} instead
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static void toggleAdminChat(Player player) throws NullPointerException {
|
public static void toggleAdminChat(Player player) throws NullPointerException {
|
||||||
@ -152,7 +152,7 @@ public final class ChatAPI {
|
|||||||
* Toggle the admin chat mode of a player.
|
* Toggle the admin chat mode of a player.
|
||||||
*
|
*
|
||||||
* @param playerName The name of the player to toggle party chat on.
|
* @param playerName The name of the player to toggle party chat on.
|
||||||
* @deprecated Use {@link #toggleAdminChat(McMMOPlayer)} instead
|
* @deprecated Use {@link #toggleAdminChat(OnlineMMOPlayer)} instead
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static void toggleAdminChat(String playerName) throws NullPointerException {
|
public static void toggleAdminChat(String playerName) throws NullPointerException {
|
||||||
|
@ -6,7 +6,7 @@ import com.gmail.nossr50.config.experience.ExperienceConfig;
|
|||||||
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@ -47,7 +47,7 @@ public final class ExperienceAPI {
|
|||||||
* @deprecated Draft API
|
* @deprecated Draft API
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static void addCombatXP(McMMOPlayer mmoPlayer, LivingEntity target, PrimarySkillType primarySkillType, double multiplier) {
|
public static void addCombatXP(OnlineMMOPlayer mmoPlayer, LivingEntity target, PrimarySkillType primarySkillType, double multiplier) {
|
||||||
CombatUtils.processCombatXP(mmoPlayer, target, primarySkillType, multiplier);
|
CombatUtils.processCombatXP(mmoPlayer, target, primarySkillType, multiplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ public final class ExperienceAPI {
|
|||||||
* @deprecated Draft API
|
* @deprecated Draft API
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static void addCombatXP(McMMOPlayer mmoPlayer, LivingEntity target, PrimarySkillType primarySkillType) {
|
public static void addCombatXP(OnlineMMOPlayer mmoPlayer, LivingEntity target, PrimarySkillType primarySkillType) {
|
||||||
CombatUtils.processCombatXP(mmoPlayer, target, primarySkillType);
|
CombatUtils.processCombatXP(mmoPlayer, target, primarySkillType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1064,7 +1064,7 @@ public final class ExperienceAPI {
|
|||||||
* @param blockStates the blocks to reward XP for
|
* @param blockStates the blocks to reward XP for
|
||||||
* @param mmoPlayer the target player
|
* @param mmoPlayer the target player
|
||||||
*/
|
*/
|
||||||
public static void addXpFromBlocks(ArrayList<BlockState> blockStates, McMMOPlayer mmoPlayer)
|
public static void addXpFromBlocks(ArrayList<BlockState> blockStates, OnlineMMOPlayer mmoPlayer)
|
||||||
{
|
{
|
||||||
for(BlockState bs : blockStates)
|
for(BlockState bs : blockStates)
|
||||||
{
|
{
|
||||||
@ -1084,7 +1084,7 @@ public final class ExperienceAPI {
|
|||||||
* @param mmoPlayer the target player
|
* @param mmoPlayer the target player
|
||||||
* @param skillType target primary skill
|
* @param skillType target primary skill
|
||||||
*/
|
*/
|
||||||
public static void addXpFromBlocksBySkill(ArrayList<BlockState> blockStates, McMMOPlayer mmoPlayer, PrimarySkillType skillType)
|
public static void addXpFromBlocksBySkill(ArrayList<BlockState> blockStates, OnlineMMOPlayer mmoPlayer, PrimarySkillType skillType)
|
||||||
{
|
{
|
||||||
for(BlockState bs : blockStates)
|
for(BlockState bs : blockStates)
|
||||||
{
|
{
|
||||||
@ -1100,7 +1100,7 @@ public final class ExperienceAPI {
|
|||||||
* @param blockState The target blockstate
|
* @param blockState The target blockstate
|
||||||
* @param mmoPlayer The target player
|
* @param mmoPlayer The target player
|
||||||
*/
|
*/
|
||||||
public static void addXpFromBlock(BlockState blockState, McMMOPlayer mmoPlayer)
|
public static void addXpFromBlock(BlockState blockState, OnlineMMOPlayer mmoPlayer)
|
||||||
{
|
{
|
||||||
for(PrimarySkillType skillType : PrimarySkillType.values())
|
for(PrimarySkillType skillType : PrimarySkillType.values())
|
||||||
{
|
{
|
||||||
@ -1117,7 +1117,7 @@ public final class ExperienceAPI {
|
|||||||
* @param mmoPlayer The target player
|
* @param mmoPlayer The target player
|
||||||
* @param skillType target primary skill
|
* @param skillType target primary skill
|
||||||
*/
|
*/
|
||||||
public static void addXpFromBlockBySkill(BlockState blockState, McMMOPlayer mmoPlayer, PrimarySkillType skillType)
|
public static void addXpFromBlockBySkill(BlockState blockState, OnlineMMOPlayer mmoPlayer, PrimarySkillType skillType)
|
||||||
{
|
{
|
||||||
if(ExperienceConfig.getInstance().getXp(skillType, blockState.getType()) > 0)
|
if(ExperienceConfig.getInstance().getXp(skillType, blockState.getType()) > 0)
|
||||||
{
|
{
|
||||||
@ -1208,11 +1208,11 @@ public final class ExperienceAPI {
|
|||||||
/**
|
/**
|
||||||
* @deprecated Use UserManager::getPlayer(Player player) instead
|
* @deprecated Use UserManager::getPlayer(Player player) instead
|
||||||
* @param player target player
|
* @param player target player
|
||||||
* @return McMMOPlayer for that player if the profile is loaded, otherwise null
|
* @return OnlineMMOPlayer for that player if the profile is loaded, otherwise null
|
||||||
* @throws McMMOPlayerNotFoundException
|
* @throws McMMOPlayerNotFoundException
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
private static McMMOPlayer getPlayer(Player player) throws McMMOPlayerNotFoundException {
|
private static OnlineMMOPlayer getPlayer(Player player) throws McMMOPlayerNotFoundException {
|
||||||
if (!mcMMO.getUserManager().hasPlayerDataKey(player)) {
|
if (!mcMMO.getUserManager().hasPlayerDataKey(player)) {
|
||||||
throw new McMMOPlayerNotFoundException(player);
|
throw new McMMOPlayerNotFoundException(player);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import com.gmail.nossr50.chat.mailer.PartyChatMailer;
|
|||||||
import com.gmail.nossr50.config.ChatConfig;
|
import com.gmail.nossr50.config.ChatConfig;
|
||||||
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
@ -45,7 +45,7 @@ public class ChatManager {
|
|||||||
* @param rawMessage the raw message from the player as it was typed
|
* @param rawMessage the raw message from the player as it was typed
|
||||||
* @param isAsync whether or not this is getting processed via async
|
* @param isAsync whether or not this is getting processed via async
|
||||||
*/
|
*/
|
||||||
public void processPlayerMessage(@NotNull McMMOPlayer mmoPlayer, @NotNull String rawMessage, boolean isAsync) {
|
public void processPlayerMessage(@NotNull OnlineMMOPlayer mmoPlayer, @NotNull String rawMessage, boolean isAsync) {
|
||||||
processPlayerMessage(mmoPlayer, mmoPlayer.getChatChannel(), rawMessage, isAsync);
|
processPlayerMessage(mmoPlayer, mmoPlayer.getChatChannel(), rawMessage, isAsync);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ public class ChatManager {
|
|||||||
* @param args the raw command arguments from the player
|
* @param args the raw command arguments from the player
|
||||||
* @param chatChannel target channel
|
* @param chatChannel target channel
|
||||||
*/
|
*/
|
||||||
public void processPlayerMessage(@NotNull McMMOPlayer mmoPlayer, @NotNull String[] args, @NotNull ChatChannel chatChannel) {
|
public void processPlayerMessage(@NotNull OnlineMMOPlayer mmoPlayer, @NotNull String[] args, @NotNull ChatChannel chatChannel) {
|
||||||
String chatMessageWithoutCommand = buildChatMessage(args);
|
String chatMessageWithoutCommand = buildChatMessage(args);
|
||||||
|
|
||||||
//Commands are never async
|
//Commands are never async
|
||||||
@ -71,7 +71,7 @@ public class ChatManager {
|
|||||||
* @param rawMessage raw chat message as it was typed
|
* @param rawMessage raw chat message as it was typed
|
||||||
* @param isAsync whether or not this is getting processed via async
|
* @param isAsync whether or not this is getting processed via async
|
||||||
*/
|
*/
|
||||||
private void processPlayerMessage(@NotNull McMMOPlayer mmoPlayer, @NotNull ChatChannel chatChannel, @NotNull String rawMessage, boolean isAsync) {
|
private void processPlayerMessage(@NotNull OnlineMMOPlayer mmoPlayer, @NotNull ChatChannel chatChannel, @NotNull String rawMessage, boolean isAsync) {
|
||||||
switch (chatChannel) {
|
switch (chatChannel) {
|
||||||
case ADMIN:
|
case ADMIN:
|
||||||
adminChatMailer.processChatMessage(mmoPlayer.getPlayerAuthor(), rawMessage, isAsync, Permissions.colorChat(mmoPlayer.getPlayer()));
|
adminChatMailer.processChatMessage(mmoPlayer.getPlayerAuthor(), rawMessage, isAsync, Permissions.colorChat(mmoPlayer.getPlayer()));
|
||||||
@ -119,12 +119,12 @@ public class ChatManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the chat channel of a {@link McMMOPlayer}
|
* Change the chat channel of a {@link OnlineMMOPlayer}
|
||||||
* Targeting the channel a player is already in will remove that player from the chat channel
|
* Targeting the channel a player is already in will remove that player from the chat channel
|
||||||
* @param mmoPlayer target player
|
* @param mmoPlayer target player
|
||||||
* @param targetChatChannel target chat channel
|
* @param targetChatChannel target chat channel
|
||||||
*/
|
*/
|
||||||
public void setOrToggleChatChannel(@NotNull McMMOPlayer mmoPlayer, @NotNull ChatChannel targetChatChannel) {
|
public void setOrToggleChatChannel(@NotNull OnlineMMOPlayer mmoPlayer, @NotNull ChatChannel targetChatChannel) {
|
||||||
if(targetChatChannel == mmoPlayer.getChatChannel()) {
|
if(targetChatChannel == mmoPlayer.getChatChannel()) {
|
||||||
//Disabled message
|
//Disabled message
|
||||||
mmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Chat.Channel.Off", StringUtils.getCapitalized(targetChatChannel.toString())));
|
mmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Chat.Channel.Off", StringUtils.getCapitalized(targetChatChannel.toString())));
|
||||||
@ -159,7 +159,7 @@ public class ChatManager {
|
|||||||
* @param mmoPlayer target player
|
* @param mmoPlayer target player
|
||||||
* @return true if the player can send messages to that chat channel
|
* @return true if the player can send messages to that chat channel
|
||||||
*/
|
*/
|
||||||
public boolean isMessageAllowed(@NotNull McMMOPlayer mmoPlayer) {
|
public boolean isMessageAllowed(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
switch (mmoPlayer.getChatChannel()) {
|
switch (mmoPlayer.getChatChannel()) {
|
||||||
case ADMIN:
|
case ADMIN:
|
||||||
if(mmoPlayer.getPlayer().isOp() || Permissions.adminChat(mmoPlayer.getPlayer())) {
|
if(mmoPlayer.getPlayer().isOp() || Permissions.adminChat(mmoPlayer.getPlayer())) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.chat;
|
package com.gmail.nossr50.chat;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.command.ConsoleCommandSender;
|
import org.bukkit.command.ConsoleCommandSender;
|
||||||
@ -25,7 +25,7 @@ public class SamePartyPredicate<T extends CommandSender> implements Predicate<T>
|
|||||||
} else {
|
} else {
|
||||||
if(t instanceof Player) {
|
if(t instanceof Player) {
|
||||||
Player player = (Player) t;
|
Player player = (Player) t;
|
||||||
McMMOPlayer mcMMOPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mcMMOPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
if(mcMMOPlayer != null) {
|
if(mcMMOPlayer != null) {
|
||||||
return mcMMOPlayer.getParty() == party;
|
return mcMMOPlayer.getParty() == party;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.chat.message;
|
|||||||
import com.gmail.nossr50.chat.author.Author;
|
import com.gmail.nossr50.chat.author.Author;
|
||||||
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
@ -61,7 +61,7 @@ public class PartyChatMessage extends AbstractChatMessage {
|
|||||||
*/
|
*/
|
||||||
private void messagePartyChatSpies(@NotNull TextComponent spyMessage) {
|
private void messagePartyChatSpies(@NotNull TextComponent spyMessage) {
|
||||||
//Find the people with permissions
|
//Find the people with permissions
|
||||||
for(McMMOPlayer mcMMOPlayer : UserManager.getPlayers()) {
|
for(OnlineMMOPlayer mcMMOPlayer : UserManager.getPlayers()) {
|
||||||
Player player = mcMMOPlayer.getPlayer();
|
Player player = mcMMOPlayer.getPlayer();
|
||||||
|
|
||||||
//Check for toggled players
|
//Check for toggled players
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands;
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -18,7 +18,7 @@ public class AbilityToggleCommand extends ToggleCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void applyCommandAction(@NotNull McMMOPlayer mmoPlayer) {
|
protected void applyCommandAction(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
mmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.Ability." + (mmoPlayer.getSuperAbilityManager().getAbilityActivationPermission() ? "Off" : "On")));
|
mmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.Ability." + (mmoPlayer.getSuperAbilityManager().getAbilityActivationPermission() ? "Off" : "On")));
|
||||||
mmoPlayer.getSuperAbilityManager().toggleAbilityActivationPermission();
|
mmoPlayer.getSuperAbilityManager().toggleAbilityActivationPermission();
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import com.gmail.nossr50.commands.chat.AdminChatCommand;
|
|||||||
import com.gmail.nossr50.commands.chat.PartyChatCommand;
|
import com.gmail.nossr50.commands.chat.PartyChatCommand;
|
||||||
import com.gmail.nossr50.config.ChatConfig;
|
import com.gmail.nossr50.config.ChatConfig;
|
||||||
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
@ -103,7 +103,7 @@ public class CommandManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void validatePlayerParty(@NotNull Player player) {
|
public void validatePlayerParty(@NotNull Player player) {
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if(mmoPlayer.getParty() == null) {
|
if(mmoPlayer.getParty() == null) {
|
||||||
throw new ConditionFailedException(LocaleLoader.getString("Commands.Party.None"));
|
throw new ConditionFailedException(LocaleLoader.getString("Commands.Party.None"));
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.commands;
|
|||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.database.FlatFileDatabaseManager;
|
import com.gmail.nossr50.database.FlatFileDatabaseManager;
|
||||||
import com.gmail.nossr50.database.SQLDatabaseManager;
|
import com.gmail.nossr50.database.SQLDatabaseManager;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -20,7 +20,7 @@ public class MHDCommand implements TabExecutor {
|
|||||||
if (mcMMO.getDatabaseManager() instanceof SQLDatabaseManager) {
|
if (mcMMO.getDatabaseManager() instanceof SQLDatabaseManager) {
|
||||||
SQLDatabaseManager m = (SQLDatabaseManager) mcMMO.getDatabaseManager();
|
SQLDatabaseManager m = (SQLDatabaseManager) mcMMO.getDatabaseManager();
|
||||||
m.resetMobHealthSettings();
|
m.resetMobHealthSettings();
|
||||||
for (McMMOPlayer mmoPlayer : mcMMO.getUserManager().getPlayers()) {
|
for (OnlineMMOPlayer mmoPlayer : mcMMO.getUserManager().getPlayers()) {
|
||||||
mmoPlayer.setMobHealthBarType(Config.getInstance().getMobHealthbarDefault());
|
mmoPlayer.setMobHealthBarType(Config.getInstance().getMobHealthbarDefault());
|
||||||
}
|
}
|
||||||
sender.sendMessage("Mob health reset");
|
sender.sendMessage("Mob health reset");
|
||||||
@ -29,7 +29,7 @@ public class MHDCommand implements TabExecutor {
|
|||||||
if (mcMMO.getDatabaseManager() instanceof FlatFileDatabaseManager) {
|
if (mcMMO.getDatabaseManager() instanceof FlatFileDatabaseManager) {
|
||||||
FlatFileDatabaseManager m = (FlatFileDatabaseManager) mcMMO.getDatabaseManager();
|
FlatFileDatabaseManager m = (FlatFileDatabaseManager) mcMMO.getDatabaseManager();
|
||||||
m.resetMobHealthSettings();
|
m.resetMobHealthSettings();
|
||||||
for (McMMOPlayer mmoPlayer : mcMMO.getUserManager().getPlayers()) {
|
for (OnlineMMOPlayer mmoPlayer : mcMMO.getUserManager().getPlayers()) {
|
||||||
mmoPlayer.setMobHealthBarType(Config.getInstance().getMobHealthbarDefault());
|
mmoPlayer.setMobHealthBarType(Config.getInstance().getMobHealthbarDefault());
|
||||||
}
|
}
|
||||||
sender.sendMessage("Mob health reset");
|
sender.sendMessage("Mob health reset");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands;
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -18,7 +18,7 @@ public class McgodCommand extends ToggleCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void applyCommandAction(@NotNull McMMOPlayer mmoPlayer) {
|
protected void applyCommandAction(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
mmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.GodMode." + (mmoPlayer.getGodMode() ? "Disabled" : "Enabled")));
|
mmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.GodMode." + (mmoPlayer.getGodMode() ? "Disabled" : "Enabled")));
|
||||||
mmoPlayer.toggleGodMode();
|
mmoPlayer.toggleGodMode();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands;
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
@ -21,7 +21,7 @@ public class McnotifyCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer((Player) sender);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer((Player) sender);
|
||||||
|
|
||||||
//Not Loaded yet
|
//Not Loaded yet
|
||||||
if (mmoPlayer == null)
|
if (mmoPlayer == null)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands;
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -18,7 +18,7 @@ public class McrefreshCommand extends ToggleCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void applyCommandAction(@NotNull McMMOPlayer mmoPlayer) {
|
protected void applyCommandAction(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
mmoPlayer.setRecentlyHurtTimestamp(0);
|
mmoPlayer.setRecentlyHurtTimestamp(0);
|
||||||
mmoPlayer.getSuperAbilityManager().resetCooldowns();
|
mmoPlayer.getSuperAbilityManager().resetCooldowns();
|
||||||
mmoPlayer.getSuperAbilityManager().unprimeAllAbilityTools();
|
mmoPlayer.getSuperAbilityManager().unprimeAllAbilityTools();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands;
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
@ -35,7 +35,7 @@ public abstract class ToggleCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer((Player) sender);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer((Player) sender);
|
||||||
|
|
||||||
if(mmoPlayer != null) {
|
if(mmoPlayer != null) {
|
||||||
applyCommandAction(mmoPlayer);
|
applyCommandAction(mmoPlayer);
|
||||||
@ -53,7 +53,7 @@ public abstract class ToggleCommand implements TabExecutor {
|
|||||||
|
|
||||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
Player otherPlayer = Bukkit.getPlayer(playerName);
|
Player otherPlayer = Bukkit.getPlayer(playerName);
|
||||||
McMMOPlayer mmoOther = mcMMO.getUserManager().queryPlayer(otherPlayer);
|
OnlineMMOPlayer mmoOther = mcMMO.getUserManager().queryPlayer(otherPlayer);
|
||||||
|
|
||||||
if (!CommandUtils.checkPlayerExistence(sender, playerName, mmoOther)) {
|
if (!CommandUtils.checkPlayerExistence(sender, playerName, mmoOther)) {
|
||||||
return true;
|
return true;
|
||||||
@ -83,6 +83,6 @@ public abstract class ToggleCommand implements TabExecutor {
|
|||||||
|
|
||||||
protected abstract boolean hasOtherPermission(@NotNull CommandSender sender);
|
protected abstract boolean hasOtherPermission(@NotNull CommandSender sender);
|
||||||
protected abstract boolean hasSelfPermission(@NotNull CommandSender sender);
|
protected abstract boolean hasSelfPermission(@NotNull CommandSender sender);
|
||||||
protected abstract void applyCommandAction(@NotNull McMMOPlayer mmoPlayer);
|
protected abstract void applyCommandAction(@NotNull OnlineMMOPlayer mmoPlayer);
|
||||||
protected abstract void sendSuccessMessage(@NotNull CommandSender sender, @NotNull String playerName);
|
protected abstract void sendSuccessMessage(@NotNull CommandSender sender, @NotNull String playerName);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.admin;
|
package com.gmail.nossr50.commands.admin;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.player.NotificationManager;
|
import com.gmail.nossr50.util.player.NotificationManager;
|
||||||
@ -15,7 +15,7 @@ public class PlayerDebugCommand implements CommandExecutor {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||||
if(sender instanceof Player) {
|
if(sender instanceof Player) {
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer((Player) sender);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer((Player) sender);
|
||||||
|
|
||||||
if(mmoPlayer == null) {
|
if(mmoPlayer == null) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.NotLoaded"));
|
sender.sendMessage(LocaleLoader.getString("Commands.NotLoaded"));
|
||||||
|
@ -7,7 +7,7 @@ import co.aikar.commands.annotation.Conditions;
|
|||||||
import co.aikar.commands.annotation.Default;
|
import co.aikar.commands.annotation.Default;
|
||||||
import com.gmail.nossr50.commands.CommandManager;
|
import com.gmail.nossr50.commands.CommandManager;
|
||||||
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@ -26,7 +26,7 @@ public class AdminChatCommand extends BaseCommand {
|
|||||||
if(args == null || args.length == 0) {
|
if(args == null || args.length == 0) {
|
||||||
//Process with no arguments
|
//Process with no arguments
|
||||||
if(bukkitCommandIssuer.isPlayer()) {
|
if(bukkitCommandIssuer.isPlayer()) {
|
||||||
McMMOPlayer mmoPlayer = UserManager.getPlayer(bukkitCommandIssuer.getPlayer());
|
OnlineMMOPlayer mmoPlayer = UserManager.getPlayer(bukkitCommandIssuer.getPlayer());
|
||||||
pluginRef.getChatManager().setOrToggleChatChannel(mmoPlayer, ChatChannel.ADMIN);
|
pluginRef.getChatManager().setOrToggleChatChannel(mmoPlayer, ChatChannel.ADMIN);
|
||||||
} else {
|
} else {
|
||||||
//Not support for console
|
//Not support for console
|
||||||
@ -34,7 +34,7 @@ public class AdminChatCommand extends BaseCommand {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(bukkitCommandIssuer.isPlayer()) {
|
if(bukkitCommandIssuer.isPlayer()) {
|
||||||
McMMOPlayer mmoPlayer = UserManager.getPlayer(bukkitCommandIssuer.getPlayer());
|
OnlineMMOPlayer mmoPlayer = UserManager.getPlayer(bukkitCommandIssuer.getPlayer());
|
||||||
|
|
||||||
if(mmoPlayer == null)
|
if(mmoPlayer == null)
|
||||||
return;
|
return;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.commands.chat;
|
package com.gmail.nossr50.commands.chat;
|
||||||
|
|
||||||
import com.gmail.nossr50.commands.ToggleCommand;
|
import com.gmail.nossr50.commands.ToggleCommand;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -19,7 +19,7 @@ public class McChatSpy extends ToggleCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void applyCommandAction(@NotNull McMMOPlayer mmoPlayer) {
|
protected void applyCommandAction(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
mmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.AdminChatSpy." + (mmoPlayer.isPartyChatSpying() ? "Disabled" : "Enabled")));
|
mmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.AdminChatSpy." + (mmoPlayer.isPartyChatSpying() ? "Disabled" : "Enabled")));
|
||||||
mmoPlayer.togglePartyChatSpying();
|
mmoPlayer.togglePartyChatSpying();
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import co.aikar.commands.annotation.Default;
|
|||||||
import com.gmail.nossr50.commands.CommandManager;
|
import com.gmail.nossr50.commands.CommandManager;
|
||||||
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.party.PartyManager;
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
@ -32,7 +32,7 @@ public class PartyChatCommand extends BaseCommand {
|
|||||||
if(args == null || args.length == 0) {
|
if(args == null || args.length == 0) {
|
||||||
//Process with no arguments
|
//Process with no arguments
|
||||||
if(bukkitCommandIssuer.isPlayer()) {
|
if(bukkitCommandIssuer.isPlayer()) {
|
||||||
McMMOPlayer mmoPlayer = UserManager.getPlayer(bukkitCommandIssuer.getPlayer());
|
OnlineMMOPlayer mmoPlayer = UserManager.getPlayer(bukkitCommandIssuer.getPlayer());
|
||||||
pluginRef.getChatManager().setOrToggleChatChannel(mmoPlayer, ChatChannel.PARTY);
|
pluginRef.getChatManager().setOrToggleChatChannel(mmoPlayer, ChatChannel.PARTY);
|
||||||
} else {
|
} else {
|
||||||
//Not support for console
|
//Not support for console
|
||||||
@ -45,7 +45,7 @@ public class PartyChatCommand extends BaseCommand {
|
|||||||
* Player Logic
|
* Player Logic
|
||||||
*/
|
*/
|
||||||
if(bukkitCommandIssuer.getIssuer() instanceof Player) {
|
if(bukkitCommandIssuer.getIssuer() instanceof Player) {
|
||||||
McMMOPlayer mmoPlayer = UserManager.getPlayer(bukkitCommandIssuer.getPlayer());
|
OnlineMMOPlayer mmoPlayer = UserManager.getPlayer(bukkitCommandIssuer.getPlayer());
|
||||||
processCommandArgsPlayer(mmoPlayer, args);
|
processCommandArgsPlayer(mmoPlayer, args);
|
||||||
/*
|
/*
|
||||||
* Console Logic
|
* Console Logic
|
||||||
@ -57,11 +57,11 @@ public class PartyChatCommand extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Processes the command with arguments for a {@link McMMOPlayer}
|
* Processes the command with arguments for a {@link OnlineMMOPlayer}
|
||||||
* @param mmoPlayer target player
|
* @param mmoPlayer target player
|
||||||
* @param args command arguments
|
* @param args command arguments
|
||||||
*/
|
*/
|
||||||
private void processCommandArgsPlayer(@NotNull McMMOPlayer mmoPlayer, @NotNull String[] args) {
|
private void processCommandArgsPlayer(@NotNull OnlineMMOPlayer mmoPlayer, @NotNull String[] args) {
|
||||||
//Player is not toggling and is chatting directly to party
|
//Player is not toggling and is chatting directly to party
|
||||||
pluginRef.getChatManager().processPlayerMessage(mmoPlayer, args, ChatChannel.PARTY);
|
pluginRef.getChatManager().processPlayerMessage(mmoPlayer, args, ChatChannel.PARTY);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.experience;
|
package com.gmail.nossr50.commands.experience;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -91,7 +91,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
int value = Integer.parseInt(args[2]);
|
int value = Integer.parseInt(args[2]);
|
||||||
|
|
||||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayerName(playerName);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayerName(playerName);
|
||||||
|
|
||||||
// If the mmoPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
// If the mmoPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||||
if (mmoPlayer == null) {
|
if (mmoPlayer == null) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.commands.experience;
|
package com.gmail.nossr50.commands.experience;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -73,7 +73,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayerName(playerName);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayerName(playerName);
|
||||||
|
|
||||||
// If the mmoPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
// If the mmoPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||||
if (mmoPlayer == null) {
|
if (mmoPlayer == null) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -21,7 +21,7 @@ public class PartyAcceptCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
|
|
||||||
if (!mmoPlayer.hasPartyInvite()) {
|
if (!mmoPlayer.hasPartyInvite()) {
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.commands.party;
|
|||||||
import com.gmail.nossr50.commands.chat.PartyChatCommand;
|
import com.gmail.nossr50.commands.chat.PartyChatCommand;
|
||||||
import com.gmail.nossr50.commands.party.teleport.PtpCommand;
|
import com.gmail.nossr50.commands.party.teleport.PtpCommand;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
@ -75,7 +75,7 @@ public class PartyCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if (args.length < 1) {
|
if (args.length < 1) {
|
||||||
if (!mcMMO.getPartyManager().mmoPlayer.inParty()) {
|
if (!mcMMO.getPartyManager().mmoPlayer.inParty()) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -16,7 +16,7 @@ public class PartyCreateCommand implements CommandExecutor {
|
|||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if(mcMMO.getUserManager().queryPlayer(player) == null)
|
if(mcMMO.getUserManager().queryPlayer(player) == null)
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.commands.party;
|
|||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -27,7 +27,7 @@ public class PartyInfoCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
Party party = mmoPlayer.getParty();
|
Party party = mmoPlayer.getParty();
|
||||||
|
|
||||||
displayPartyHeader(player, party);
|
displayPartyHeader(player, party);
|
||||||
@ -101,7 +101,7 @@ public class PartyInfoCommand implements CommandExecutor {
|
|||||||
player.sendMessage(LocaleLoader.getString("Commands.Party.ShareMode") + expShareInfo);
|
player.sendMessage(LocaleLoader.getString("Commands.Party.ShareMode") + expShareInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayMemberInfo(Player player, McMMOPlayer mmoPlayer, Party party) {
|
private void displayMemberInfo(Player player, OnlineMMOPlayer mmoPlayer, Party party) {
|
||||||
/*
|
/*
|
||||||
* Only show members of the party that this member can see
|
* Only show members of the party that this member can see
|
||||||
*/
|
*/
|
||||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.commands.party;
|
|||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
@ -17,7 +17,7 @@ public class PartyInviteCommand implements CommandExecutor {
|
|||||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
|
||||||
if (args.length == 2) {
|
if (args.length == 2) {
|
||||||
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||||
McMMOPlayer mcMMOTarget = mcMMO.getUserManager().queryPlayerName(targetName);
|
OnlineMMOPlayer mcMMOTarget = mcMMO.getUserManager().queryPlayerName(targetName);
|
||||||
|
|
||||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||||
return false;
|
return false;
|
||||||
@ -31,7 +31,7 @@ public class PartyInviteCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
String playerName = player.getName();
|
String playerName = player.getName();
|
||||||
|
|
||||||
if (player.equals(target)) {
|
if (player.equals(target)) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -21,7 +21,7 @@ public class PartyQuitCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().getPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().getPlayer(player);
|
||||||
Party playerParty = mmoPlayer.getParty();
|
Party playerParty = mmoPlayer.getParty();
|
||||||
|
|
||||||
if (!mcMMO.getPartyManager().handlePartyChangeEvent(player, playerParty.getPartyName(), null, EventReason.LEFT_PARTY)) {
|
if (!mcMMO.getPartyManager().handlePartyChangeEvent(player, playerParty.getPartyName(), null, EventReason.LEFT_PARTY)) {
|
||||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.commands.party;
|
|||||||
|
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.party.PartyMember;
|
import com.gmail.nossr50.datatypes.party.PartyMember;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@ -21,7 +21,7 @@ public class PartyRenameCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer((Player) sender);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer((Player) sender);
|
||||||
Party playerParty = mmoPlayer.getParty();
|
Party playerParty = mmoPlayer.getParty();
|
||||||
|
|
||||||
String oldPartyName = playerParty.getPartyName();
|
String oldPartyName = playerParty.getPartyName();
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.commands.party.teleport;
|
|||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.party.PartyMember;
|
import com.gmail.nossr50.datatypes.party.PartyMember;
|
||||||
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
@ -26,7 +26,7 @@ public class PtpAcceptAnyCommand implements CommandExecutor {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
Player playerSender = (Player) sender;
|
Player playerSender = (Player) sender;
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(playerSender);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(playerSender);
|
||||||
|
|
||||||
if(mmoPlayer == null) {
|
if(mmoPlayer == null) {
|
||||||
playerSender.sendMessage(LocaleLoader.getString("Commands.NotLoaded"));
|
playerSender.sendMessage(LocaleLoader.getString("Commands.NotLoaded"));
|
||||||
|
@ -5,7 +5,7 @@ import com.gmail.nossr50.config.WorldBlacklist;
|
|||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.runnables.items.TeleportationWarmup;
|
import com.gmail.nossr50.runnables.items.TeleportationWarmup;
|
||||||
@ -65,7 +65,7 @@ public class PtpCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if (!mmoPlayer.inParty()) {
|
if (!mmoPlayer.inParty()) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||||
@ -139,7 +139,7 @@ public class PtpCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if (!mmoPlayer.inParty()) {
|
if (!mmoPlayer.inParty()) {
|
||||||
return ImmutableList.of();
|
return ImmutableList.of();
|
||||||
@ -159,7 +159,7 @@ public class PtpCommand implements TabExecutor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mcMMOTarget = mcMMO.getUserManager().getPlayer(targetName);
|
OnlineMMOPlayer mcMMOTarget = mcMMO.getUserManager().getPlayer(targetName);
|
||||||
Player target = mcMMOTarget.getPlayer();
|
Player target = mcMMOTarget.getPlayer();
|
||||||
|
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ public class PtpCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected static boolean canTeleport(CommandSender sender, Player player, String targetName) {
|
protected static boolean canTeleport(CommandSender sender, Player player, String targetName) {
|
||||||
McMMOPlayer mcMMOTarget = mcMMO.getUserManager().getPlayer(targetName);
|
OnlineMMOPlayer mcMMOTarget = mcMMO.getUserManager().getPlayer(targetName);
|
||||||
|
|
||||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||||
return false;
|
return false;
|
||||||
@ -240,8 +240,8 @@ public class PtpCommand implements TabExecutor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(teleportingPlayer);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(teleportingPlayer);
|
||||||
McMMOPlayer mcMMOTarget = mcMMO.getUserManager().queryPlayer(targetPlayer);
|
OnlineMMOPlayer mcMMOTarget = mcMMO.getUserManager().queryPlayer(targetPlayer);
|
||||||
|
|
||||||
long warmup = Config.getInstance().getPTPCommandWarmup();
|
long warmup = Config.getInstance().getPTPCommandWarmup();
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.commands.player;
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.commands.player;
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
@ -42,7 +42,7 @@ public class MccooldownCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().getPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().getPlayer(player);
|
||||||
|
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Header"));
|
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Header"));
|
||||||
player.sendMessage(LocaleLoader.getString("mcMMO.NoSkillNote"));
|
player.sendMessage(LocaleLoader.getString("mcMMO.NoSkillNote"));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.commands.player;
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.runnables.commands.McrankCommandAsyncTask;
|
import com.gmail.nossr50.runnables.commands.McrankCommandAsyncTask;
|
||||||
@ -52,7 +52,7 @@ public class McrankCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayerName(playerName);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayerName(playerName);
|
||||||
|
|
||||||
if (mmoPlayer != null) {
|
if (mmoPlayer != null) {
|
||||||
Player player = mmoPlayer.getPlayer();
|
Player player = mmoPlayer.getPlayer();
|
||||||
@ -82,7 +82,7 @@ public class McrankCommand implements TabExecutor {
|
|||||||
|
|
||||||
private void display(CommandSender sender, String playerName) {
|
private void display(CommandSender sender, String playerName) {
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().getPlayer(sender.getName());
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().getPlayer(sender.getName());
|
||||||
|
|
||||||
if(mmoPlayer == null)
|
if(mmoPlayer == null)
|
||||||
{
|
{
|
||||||
@ -113,7 +113,7 @@ public class McrankCommand implements TabExecutor {
|
|||||||
new McrankCommandAsyncTask(playerName, sender, useBoard, useChat).runTaskAsynchronously(mcMMO.p);
|
new McrankCommandAsyncTask(playerName, sender, useBoard, useChat).runTaskAsynchronously(mcMMO.p);
|
||||||
}
|
}
|
||||||
|
|
||||||
private long getCDSeconds(McMMOPlayer mmoPlayer, long cooldownMillis) {
|
private long getCDSeconds(OnlineMMOPlayer mmoPlayer, long cooldownMillis) {
|
||||||
return ((mmoPlayer.getDatabaseCommandATS() + cooldownMillis) - System.currentTimeMillis());
|
return ((mmoPlayer.getDatabaseCommandATS() + cooldownMillis) - System.currentTimeMillis());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.commands.player;
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
@ -34,7 +34,7 @@ public class McstatsCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if (Config.getInstance().getStatsUseBoard() && Config.getInstance().getScoreboardsEnabled()) {
|
if (Config.getInstance().getStatsUseBoard() && Config.getInstance().getScoreboardsEnabled()) {
|
||||||
ScoreboardManager.enablePlayerStatsScoreboard(player);
|
ScoreboardManager.enablePlayerStatsScoreboard(player);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.commands.player;
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@ -84,7 +84,7 @@ public class MctopCommand implements TabExecutor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().getPlayer(sender.getName());
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().getPlayer(sender.getName());
|
||||||
long cooldownMillis = Math.max(Config.getInstance().getDatabasePlayerCooldown(), 1750);
|
long cooldownMillis = Math.max(Config.getInstance().getDatabasePlayerCooldown(), 1750);
|
||||||
|
|
||||||
if (mmoPlayer.getDatabaseCommandATS() + cooldownMillis > System.currentTimeMillis()) {
|
if (mmoPlayer.getDatabaseCommandATS() + cooldownMillis > System.currentTimeMillis()) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.player;
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.util.experience.MMOExperienceBarManager;
|
import com.gmail.nossr50.util.experience.MMOExperienceBarManager;
|
||||||
import com.gmail.nossr50.util.player.NotificationManager;
|
import com.gmail.nossr50.util.player.NotificationManager;
|
||||||
@ -23,7 +23,7 @@ public class XPBarCommand implements TabExecutor {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||||
if(sender instanceof Player) {
|
if(sender instanceof Player) {
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().getPlayer((Player) sender);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().getPlayer((Player) sender);
|
||||||
if(mmoPlayer == null) {
|
if(mmoPlayer == null) {
|
||||||
NotificationManager.sendPlayerInformationChatOnlyPrefixed(mmoPlayer.getPlayer(), "Profile.PendingLoad");
|
NotificationManager.sendPlayerInformationChatOnlyPrefixed(mmoPlayer.getPlayer(), "Profile.PendingLoad");
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
||||||
@ -28,7 +28,7 @@ public class AcrobaticsCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
// ACROBATICS_DODGE
|
// ACROBATICS_DODGE
|
||||||
if (canDodge) {
|
if (canDodge) {
|
||||||
String[] dodgeStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, mmoPlayer, SubSkillType.ACROBATICS_DODGE);
|
String[] dodgeStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, mmoPlayer, SubSkillType.ACROBATICS_DODGE);
|
||||||
@ -38,13 +38,13 @@ public class AcrobaticsCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canDodge = canUseSubskill(mmoPlayer, SubSkillType.ACROBATICS_DODGE);
|
canDodge = canUseSubskill(mmoPlayer, SubSkillType.ACROBATICS_DODGE);
|
||||||
canRoll = canUseSubskill(mmoPlayer, SubSkillType.ACROBATICS_ROLL);
|
canRoll = canUseSubskill(mmoPlayer, SubSkillType.ACROBATICS_ROLL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
if (canDodge) {
|
if (canDodge) {
|
||||||
@ -90,7 +90,7 @@ public class AcrobaticsCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.ACROBATICS);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.ACROBATICS);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -33,7 +33,7 @@ public class AlchemyCommand extends SkillCommand {
|
|||||||
|
|
||||||
protected String[] calculateAbilityDisplayValues(@NotNull Player player) {
|
protected String[] calculateAbilityDisplayValues(@NotNull Player player) {
|
||||||
//TODO: Needed?
|
//TODO: Needed?
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
if(mmoPlayer == null)
|
if(mmoPlayer == null)
|
||||||
{
|
{
|
||||||
player.sendMessage(LocaleLoader.getString("Profile.PendingLoad"));
|
player.sendMessage(LocaleLoader.getString("Profile.PendingLoad"));
|
||||||
@ -43,7 +43,7 @@ public class AlchemyCommand extends SkillCommand {
|
|||||||
return calculateAbilityDisplayValues(mmoPlayer);
|
return calculateAbilityDisplayValues(mmoPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String[] calculateAbilityDisplayValues(@NotNull McMMOPlayer mmoPlayer) {
|
protected String[] calculateAbilityDisplayValues(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
AlchemyManager alchemyManager = mmoPlayer.getAlchemyManager();
|
AlchemyManager alchemyManager = mmoPlayer.getAlchemyManager();
|
||||||
String[] displayValues = new String[2];
|
String[] displayValues = new String[2];
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ public class AlchemyCommand extends SkillCommand {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
// ALCHEMY_CATALYSIS
|
// ALCHEMY_CATALYSIS
|
||||||
if (canCatalysis) {
|
if (canCatalysis) {
|
||||||
String[] catalysisStrings = calculateAbilityDisplayValues(mmoPlayer.getPlayer());
|
String[] catalysisStrings = calculateAbilityDisplayValues(mmoPlayer.getPlayer());
|
||||||
@ -75,13 +75,13 @@ public class AlchemyCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canCatalysis = canUseSubskill(mmoPlayer, SubSkillType.ALCHEMY_CATALYSIS);
|
canCatalysis = canUseSubskill(mmoPlayer, SubSkillType.ALCHEMY_CATALYSIS);
|
||||||
canConcoctions = canUseSubskill(mmoPlayer, SubSkillType.ALCHEMY_CONCOCTIONS);
|
canConcoctions = canUseSubskill(mmoPlayer, SubSkillType.ALCHEMY_CONCOCTIONS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
if (canCatalysis) {
|
if (canCatalysis) {
|
||||||
@ -101,7 +101,7 @@ public class AlchemyCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.ALCHEMY);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.ALCHEMY);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -30,7 +30,7 @@ public class ArcheryCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
// ARCHERY_ARROW_RETRIEVAL
|
// ARCHERY_ARROW_RETRIEVAL
|
||||||
if (canRetrieve) {
|
if (canRetrieve) {
|
||||||
String[] retrieveStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, mmoPlayer, SubSkillType.ARCHERY_ARROW_RETRIEVAL);
|
String[] retrieveStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, mmoPlayer, SubSkillType.ARCHERY_ARROW_RETRIEVAL);
|
||||||
@ -52,14 +52,14 @@ public class ArcheryCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canSkillShot = canUseSubskill(mmoPlayer, SubSkillType.ARCHERY_SKILL_SHOT);
|
canSkillShot = canUseSubskill(mmoPlayer, SubSkillType.ARCHERY_SKILL_SHOT);
|
||||||
canDaze = canUseSubskill(mmoPlayer, SubSkillType.ARCHERY_DAZE);
|
canDaze = canUseSubskill(mmoPlayer, SubSkillType.ARCHERY_DAZE);
|
||||||
canRetrieve = canUseSubskill(mmoPlayer, SubSkillType.ARCHERY_ARROW_RETRIEVAL);
|
canRetrieve = canUseSubskill(mmoPlayer, SubSkillType.ARCHERY_ARROW_RETRIEVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
if (canRetrieve) {
|
if (canRetrieve) {
|
||||||
@ -85,7 +85,7 @@ public class ArcheryCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.ARCHERY);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.ARCHERY);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -35,7 +35,7 @@ public class AxesCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
// ARMOR IMPACT
|
// ARMOR IMPACT
|
||||||
if (canImpact) {
|
if (canImpact) {
|
||||||
impactDamage = mmoPlayer.getAxesManager().getImpactDurabilityDamage();
|
impactDamage = mmoPlayer.getAxesManager().getImpactDurabilityDamage();
|
||||||
@ -62,7 +62,7 @@ public class AxesCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canSkullSplitter = Permissions.skullSplitter(mmoPlayer.getPlayer()) && RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.AXES_SKULL_SPLITTER);
|
canSkullSplitter = Permissions.skullSplitter(mmoPlayer.getPlayer()) && RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.AXES_SKULL_SPLITTER);
|
||||||
canCritical = canUseSubskill(mmoPlayer, SubSkillType.AXES_CRITICAL_STRIKES);
|
canCritical = canUseSubskill(mmoPlayer, SubSkillType.AXES_CRITICAL_STRIKES);
|
||||||
canAxeMastery = canUseSubskill(mmoPlayer, SubSkillType.AXES_AXE_MASTERY);
|
canAxeMastery = canUseSubskill(mmoPlayer, SubSkillType.AXES_AXE_MASTERY);
|
||||||
@ -71,7 +71,7 @@ public class AxesCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
if (canImpact) {
|
if (canImpact) {
|
||||||
@ -105,7 +105,7 @@ public class AxesCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.AXES);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.AXES);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.skills.crossbows.CrossbowManager;
|
import com.gmail.nossr50.skills.crossbows.CrossbowManager;
|
||||||
@ -17,17 +17,17 @@ public class CrossbowsCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
CrossbowManager crossbowManager = mmoPlayer.getCrossbowManager();
|
CrossbowManager crossbowManager = mmoPlayer.getCrossbowManager();
|
||||||
@ -41,7 +41,7 @@ public class CrossbowsCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.CROSSBOWS);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.CROSSBOWS);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -26,7 +26,7 @@ public class ExcavationCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
// GIGA DRILL BREAKER
|
// GIGA DRILL BREAKER
|
||||||
if (canGigaDrill) {
|
if (canGigaDrill) {
|
||||||
String[] gigaDrillStrings = calculateLengthDisplayValues(mmoPlayer, skillValue);
|
String[] gigaDrillStrings = calculateLengthDisplayValues(mmoPlayer, skillValue);
|
||||||
@ -36,13 +36,13 @@ public class ExcavationCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canGigaDrill = Permissions.gigaDrillBreaker(mmoPlayer.getPlayer()) && RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.EXCAVATION_GIGA_DRILL_BREAKER);
|
canGigaDrill = Permissions.gigaDrillBreaker(mmoPlayer.getPlayer()) && RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.EXCAVATION_GIGA_DRILL_BREAKER);
|
||||||
canTreasureHunt = canUseSubskill(mmoPlayer, SubSkillType.EXCAVATION_ARCHAEOLOGY);
|
canTreasureHunt = canUseSubskill(mmoPlayer, SubSkillType.EXCAVATION_ARCHAEOLOGY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
ExcavationManager excavationManager = mmoPlayer.getExcavationManager();
|
ExcavationManager excavationManager = mmoPlayer.getExcavationManager();
|
||||||
@ -66,7 +66,7 @@ public class ExcavationCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.EXCAVATION);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.EXCAVATION);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.datatypes.treasure.Rarity;
|
import com.gmail.nossr50.datatypes.treasure.Rarity;
|
||||||
@ -47,7 +47,7 @@ public class FishingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
FishingManager fishingManager = mmoPlayer.getFishingManager();
|
FishingManager fishingManager = mmoPlayer.getFishingManager();
|
||||||
|
|
||||||
// TREASURE HUNTER
|
// TREASURE HUNTER
|
||||||
@ -97,7 +97,7 @@ public class FishingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canTreasureHunt = canUseSubskill(mmoPlayer, SubSkillType.FISHING_TREASURE_HUNTER);
|
canTreasureHunt = canUseSubskill(mmoPlayer, SubSkillType.FISHING_TREASURE_HUNTER);
|
||||||
canMagicHunt = canUseSubskill(mmoPlayer, SubSkillType.FISHING_MAGIC_HUNTER) && canUseSubskill(mmoPlayer, SubSkillType.FISHING_TREASURE_HUNTER);
|
canMagicHunt = canUseSubskill(mmoPlayer, SubSkillType.FISHING_MAGIC_HUNTER) && canUseSubskill(mmoPlayer, SubSkillType.FISHING_TREASURE_HUNTER);
|
||||||
canShake = canUseSubskill(mmoPlayer, SubSkillType.FISHING_SHAKE);
|
canShake = canUseSubskill(mmoPlayer, SubSkillType.FISHING_SHAKE);
|
||||||
@ -107,7 +107,7 @@ public class FishingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
if (canFishermansDiet) {
|
if (canFishermansDiet) {
|
||||||
@ -152,7 +152,7 @@ public class FishingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.FISHING);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.FISHING);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -42,7 +42,7 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
|
|
||||||
// DOUBLE DROPS
|
// DOUBLE DROPS
|
||||||
if (canDoubleDrop) {
|
if (canDoubleDrop) {
|
||||||
@ -88,7 +88,7 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
hasHylianLuck = canUseSubskill(mmoPlayer, SubSkillType.HERBALISM_HYLIAN_LUCK);
|
hasHylianLuck = canUseSubskill(mmoPlayer, SubSkillType.HERBALISM_HYLIAN_LUCK);
|
||||||
canGreenTerra = Permissions.greenTerra(mmoPlayer.getPlayer());
|
canGreenTerra = Permissions.greenTerra(mmoPlayer.getPlayer());
|
||||||
canGreenThumbPlants = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.HERBALISM_GREEN_THUMB)
|
canGreenThumbPlants = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.HERBALISM_GREEN_THUMB)
|
||||||
@ -109,7 +109,7 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
if (canDoubleDrop) {
|
if (canDoubleDrop) {
|
||||||
@ -152,7 +152,7 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.HERBALISM);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.HERBALISM);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -39,7 +39,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
// BLAST MINING
|
// BLAST MINING
|
||||||
if (canBlast || canDemoExpert || canBiggerBombs) {
|
if (canBlast || canDemoExpert || canBiggerBombs) {
|
||||||
MiningManager miningManager = mmoPlayer.getMiningManager();
|
MiningManager miningManager = mmoPlayer.getMiningManager();
|
||||||
@ -68,7 +68,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canBiggerBombs = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.MINING_BIGGER_BOMBS) && Permissions.biggerBombs(mmoPlayer.getPlayer());
|
canBiggerBombs = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.MINING_BIGGER_BOMBS) && Permissions.biggerBombs(mmoPlayer.getPlayer());
|
||||||
canBlast = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.MINING_BLAST_MINING) && Permissions.remoteDetonation(mmoPlayer.getPlayer());
|
canBlast = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.MINING_BLAST_MINING) && Permissions.remoteDetonation(mmoPlayer.getPlayer());
|
||||||
canDemoExpert = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.MINING_DEMOLITIONS_EXPERTISE) && Permissions.demolitionsExpertise(mmoPlayer.getPlayer());
|
canDemoExpert = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.MINING_DEMOLITIONS_EXPERTISE) && Permissions.demolitionsExpertise(mmoPlayer.getPlayer());
|
||||||
@ -77,7 +77,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
if (canBiggerBombs) {
|
if (canBiggerBombs) {
|
||||||
@ -111,7 +111,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.MINING);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.MINING);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
||||||
@ -36,7 +36,7 @@ public class MmoInfoCommand implements TabExecutor {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
Player player = (Player) commandSender;
|
Player player = (Player) commandSender;
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if(mmoPlayer == null) {
|
if(mmoPlayer == null) {
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.NotLoaded"));
|
player.sendMessage(LocaleLoader.getString("Commands.NotLoaded"));
|
||||||
@ -78,7 +78,7 @@ public class MmoInfoCommand implements TabExecutor {
|
|||||||
return ImmutableList.of();
|
return ImmutableList.of();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayInfo(@NotNull McMMOPlayer mmoPlayer, String subSkillName)
|
private void displayInfo(@NotNull OnlineMMOPlayer mmoPlayer, String subSkillName)
|
||||||
{
|
{
|
||||||
//Check to see if the skill exists in the new system
|
//Check to see if the skill exists in the new system
|
||||||
AbstractSubSkill abstractSubSkill = InteractionManager.getAbstractByName(subSkillName);
|
AbstractSubSkill abstractSubSkill = InteractionManager.getAbstractByName(subSkillName);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
@ -48,7 +48,7 @@ public class RepairCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
// We're using pickaxes here, not the best but it works
|
// We're using pickaxes here, not the best but it works
|
||||||
Repairable diamondRepairable = mcMMO.getRepairableManager().getRepairable(Material.DIAMOND_PICKAXE);
|
Repairable diamondRepairable = mcMMO.getRepairableManager().getRepairable(Material.DIAMOND_PICKAXE);
|
||||||
Repairable goldRepairable = mcMMO.getRepairableManager().getRepairable(Material.GOLDEN_PICKAXE);
|
Repairable goldRepairable = mcMMO.getRepairableManager().getRepairable(Material.GOLDEN_PICKAXE);
|
||||||
@ -75,7 +75,7 @@ public class RepairCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canSuperRepair = canUseSubskill(mmoPlayer, SubSkillType.REPAIR_SUPER_REPAIR);
|
canSuperRepair = canUseSubskill(mmoPlayer, SubSkillType.REPAIR_SUPER_REPAIR);
|
||||||
canMasterRepair = canUseSubskill(mmoPlayer, SubSkillType.REPAIR_REPAIR_MASTERY);
|
canMasterRepair = canUseSubskill(mmoPlayer, SubSkillType.REPAIR_REPAIR_MASTERY);
|
||||||
canArcaneForge = canUseSubskill(mmoPlayer, SubSkillType.REPAIR_ARCANE_FORGING);
|
canArcaneForge = canUseSubskill(mmoPlayer, SubSkillType.REPAIR_ARCANE_FORGING);
|
||||||
@ -90,7 +90,7 @@ public class RepairCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
if (canArcaneForge) {
|
if (canArcaneForge) {
|
||||||
@ -121,7 +121,7 @@ public class RepairCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.REPAIR);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.REPAIR);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -23,19 +23,19 @@ public class SalvageCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canScrapCollector = canUseSubskill(mmoPlayer, SubSkillType.SALVAGE_SCRAP_COLLECTOR);
|
canScrapCollector = canUseSubskill(mmoPlayer, SubSkillType.SALVAGE_SCRAP_COLLECTOR);
|
||||||
canArcaneSalvage = canUseSubskill(mmoPlayer, SubSkillType.SALVAGE_ARCANE_SALVAGE);
|
canArcaneSalvage = canUseSubskill(mmoPlayer, SubSkillType.SALVAGE_ARCANE_SALVAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
SalvageManager salvageManager = mmoPlayer.getSalvageManager();
|
SalvageManager salvageManager = mmoPlayer.getSalvageManager();
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ public class SalvageCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.SALVAGE);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.SALVAGE);
|
||||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.commands.skills;
|
|||||||
|
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -59,7 +59,7 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer((Player) sender);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer((Player) sender);
|
||||||
|
|
||||||
if(mmoPlayer == null) {
|
if(mmoPlayer == null) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Profile.PendingLoad"));
|
sender.sendMessage(LocaleLoader.getString("Profile.PendingLoad"));
|
||||||
@ -121,7 +121,7 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
return skillGuideCommand.onCommand(sender, command, label, args);
|
return skillGuideCommand.onCommand(sender, command, label, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendStatMessages(@NotNull McMMOPlayer mmoPlayer, boolean isLucky, boolean hasEndurance, float skillValue) {
|
private void sendStatMessages(@NotNull OnlineMMOPlayer mmoPlayer, boolean isLucky, boolean hasEndurance, float skillValue) {
|
||||||
List<String> statsMessages = statsDisplay(mmoPlayer, skillValue, hasEndurance, isLucky);
|
List<String> statsMessages = statsDisplay(mmoPlayer, skillValue, hasEndurance, isLucky);
|
||||||
|
|
||||||
if (!statsMessages.isEmpty()) {
|
if (!statsMessages.isEmpty()) {
|
||||||
@ -135,7 +135,7 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
mmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Guides.Available", skillName, skillName.toLowerCase(Locale.ENGLISH)));
|
mmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Guides.Available", skillName, skillName.toLowerCase(Locale.ENGLISH)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendSkillCommandHeader(@NotNull McMMOPlayer mmoPlayer, int skillValue) {
|
private void sendSkillCommandHeader(@NotNull OnlineMMOPlayer mmoPlayer, int skillValue) {
|
||||||
ChatColor hd1 = ChatColor.DARK_AQUA;
|
ChatColor hd1 = ChatColor.DARK_AQUA;
|
||||||
ChatColor c1 = ChatColor.GOLD;
|
ChatColor c1 = ChatColor.GOLD;
|
||||||
ChatColor c2 = ChatColor.RED;
|
ChatColor c2 = ChatColor.RED;
|
||||||
@ -200,11 +200,11 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
return Math.min((int) skillValue, maxLevel) / rankChangeLevel;
|
return Math.min((int) skillValue, maxLevel) / rankChangeLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected @NotNull String[] getAbilityDisplayValues(@NotNull SkillActivationType skillActivationType, @NotNull McMMOPlayer mmoPlayer, @NotNull SubSkillType subSkill) {
|
protected @NotNull String[] getAbilityDisplayValues(@NotNull SkillActivationType skillActivationType, @NotNull OnlineMMOPlayer mmoPlayer, @NotNull SubSkillType subSkill) {
|
||||||
return RandomChanceUtil.calculateAbilityDisplayValues(skillActivationType, mmoPlayer.getPlayer(), subSkill);
|
return RandomChanceUtil.calculateAbilityDisplayValues(skillActivationType, mmoPlayer.getPlayer(), subSkill);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected @NotNull String[] calculateLengthDisplayValues(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected @NotNull String[] calculateLengthDisplayValues(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
int maxLength = skill.getSuperAbilityType().getMaxLength();
|
int maxLength = skill.getSuperAbilityType().getMaxLength();
|
||||||
int abilityLengthVar = AdvancedConfig.getInstance().getAbilityLength();
|
int abilityLengthVar = AdvancedConfig.getInstance().getAbilityLength();
|
||||||
int abilityLengthCap = AdvancedConfig.getInstance().getAbilityLengthCap();
|
int abilityLengthCap = AdvancedConfig.getInstance().getAbilityLengthCap();
|
||||||
@ -255,15 +255,15 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue);
|
protected abstract void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue);
|
||||||
|
|
||||||
protected abstract void permissionsCheck(@NotNull McMMOPlayer mmoPlayer);
|
protected abstract void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer);
|
||||||
|
|
||||||
//protected abstract List<String> effectsDisplay();
|
//protected abstract List<String> effectsDisplay();
|
||||||
|
|
||||||
protected abstract @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky);
|
protected abstract @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky);
|
||||||
|
|
||||||
protected abstract @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer player);
|
protected abstract @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a player can use a skill
|
* Checks if a player can use a skill
|
||||||
@ -271,7 +271,7 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
* @param subSkillType target subskill
|
* @param subSkillType target subskill
|
||||||
* @return true if the player has permission and has the skill unlocked
|
* @return true if the player has permission and has the skill unlocked
|
||||||
*/
|
*/
|
||||||
protected boolean canUseSubskill(@NotNull McMMOPlayer mmoPlayer, SubSkillType subSkillType) {
|
protected boolean canUseSubskill(@NotNull OnlineMMOPlayer mmoPlayer, SubSkillType subSkillType) {
|
||||||
return Permissions.isSubSkillEnabled(mmoPlayer.getPlayer(), subSkillType) && RankUtils.hasUnlockedSubskill(mmoPlayer, subSkillType);
|
return Permissions.isSubSkillEnabled(mmoPlayer.getPlayer(), subSkillType) && RankUtils.hasUnlockedSubskill(mmoPlayer, subSkillType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -31,7 +31,7 @@ public class SmeltingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
// FUEL EFFICIENCY
|
// FUEL EFFICIENCY
|
||||||
if (canFuelEfficiency) {
|
if (canFuelEfficiency) {
|
||||||
burnTimeModifier = String.valueOf(mmoPlayer.getSmeltingManager().getFuelEfficiencyMultiplier());
|
burnTimeModifier = String.valueOf(mmoPlayer.getSmeltingManager().getFuelEfficiencyMultiplier());
|
||||||
@ -53,7 +53,7 @@ public class SmeltingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canFuelEfficiency = canUseSubskill(mmoPlayer, SubSkillType.SMELTING_FUEL_EFFICIENCY);
|
canFuelEfficiency = canUseSubskill(mmoPlayer, SubSkillType.SMELTING_FUEL_EFFICIENCY);
|
||||||
canSecondSmelt = canUseSubskill(mmoPlayer, SubSkillType.SMELTING_SECOND_SMELT);
|
canSecondSmelt = canUseSubskill(mmoPlayer, SubSkillType.SMELTING_SECOND_SMELT);
|
||||||
//canFluxMine = canUseSubskill(player, SubSkillType.SMELTING_FLUX_MINING);
|
//canFluxMine = canUseSubskill(player, SubSkillType.SMELTING_FLUX_MINING);
|
||||||
@ -61,7 +61,7 @@ public class SmeltingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
/*if (canFluxMine) {
|
/*if (canFluxMine) {
|
||||||
@ -88,7 +88,7 @@ public class SmeltingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.SMELTING);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.SMELTING);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -34,7 +34,7 @@ public class SwordsCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
// SWORDS_COUNTER_ATTACK
|
// SWORDS_COUNTER_ATTACK
|
||||||
if (canCounter) {
|
if (canCounter) {
|
||||||
String[] counterStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, mmoPlayer, SubSkillType.SWORDS_COUNTER_ATTACK);
|
String[] counterStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, mmoPlayer, SubSkillType.SWORDS_COUNTER_ATTACK);
|
||||||
@ -60,14 +60,14 @@ public class SwordsCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canBleed = canUseSubskill(mmoPlayer, SubSkillType.SWORDS_RUPTURE);
|
canBleed = canUseSubskill(mmoPlayer, SubSkillType.SWORDS_RUPTURE);
|
||||||
canCounter = canUseSubskill(mmoPlayer, SubSkillType.SWORDS_COUNTER_ATTACK);
|
canCounter = canUseSubskill(mmoPlayer, SubSkillType.SWORDS_COUNTER_ATTACK);
|
||||||
canSerratedStrike = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.SWORDS_SERRATED_STRIKES) && Permissions.serratedStrikes(mmoPlayer.getPlayer());
|
canSerratedStrike = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.SWORDS_SERRATED_STRIKES) && Permissions.serratedStrikes(mmoPlayer.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
int ruptureTicks = mmoPlayer.getSwordsManager().getRuptureBleedTicks();
|
int ruptureTicks = mmoPlayer.getSwordsManager().getRuptureBleedTicks();
|
||||||
@ -110,7 +110,7 @@ public class SwordsCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.SWORDS);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.SWORDS);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -34,7 +34,7 @@ public class TamingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
if (canGore) {
|
if (canGore) {
|
||||||
String[] goreStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, mmoPlayer, SubSkillType.TAMING_GORE);
|
String[] goreStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, mmoPlayer, SubSkillType.TAMING_GORE);
|
||||||
goreChance = goreStrings[0];
|
goreChance = goreStrings[0];
|
||||||
@ -43,7 +43,7 @@ public class TamingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canBeastLore = canUseSubskill(mmoPlayer, SubSkillType.TAMING_BEAST_LORE);
|
canBeastLore = canUseSubskill(mmoPlayer, SubSkillType.TAMING_BEAST_LORE);
|
||||||
canCallWild = Permissions.callOfTheWild(mmoPlayer.getPlayer(), EntityType.HORSE) || Permissions.callOfTheWild(mmoPlayer.getPlayer(), EntityType.WOLF) || Permissions.callOfTheWild(mmoPlayer.getPlayer(), EntityType.OCELOT);
|
canCallWild = Permissions.callOfTheWild(mmoPlayer.getPlayer(), EntityType.HORSE) || Permissions.callOfTheWild(mmoPlayer.getPlayer(), EntityType.WOLF) || Permissions.callOfTheWild(mmoPlayer.getPlayer(), EntityType.OCELOT);
|
||||||
canEnvironmentallyAware = canUseSubskill(mmoPlayer, SubSkillType.TAMING_ENVIRONMENTALLY_AWARE);
|
canEnvironmentallyAware = canUseSubskill(mmoPlayer, SubSkillType.TAMING_ENVIRONMENTALLY_AWARE);
|
||||||
@ -56,7 +56,7 @@ public class TamingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
if (canEnvironmentallyAware) {
|
if (canEnvironmentallyAware) {
|
||||||
@ -93,7 +93,7 @@ public class TamingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, this.skill);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, this.skill);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.util.text.TextComponentFactory;
|
import com.gmail.nossr50.util.text.TextComponentFactory;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
@ -15,22 +15,22 @@ public class TridentsCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.TRIDENTS);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.TRIDENTS);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -37,7 +37,7 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
// UNARMED_ARROW_DEFLECT
|
// UNARMED_ARROW_DEFLECT
|
||||||
if (canDeflect) {
|
if (canDeflect) {
|
||||||
String[] deflectStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, mmoPlayer, SubSkillType.UNARMED_ARROW_DEFLECT);
|
String[] deflectStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, mmoPlayer, SubSkillType.UNARMED_ARROW_DEFLECT);
|
||||||
@ -73,7 +73,7 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canBerserk = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.UNARMED_BERSERK) && Permissions.berserk(mmoPlayer.getPlayer());
|
canBerserk = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.UNARMED_BERSERK) && Permissions.berserk(mmoPlayer.getPlayer());
|
||||||
canIronArm = canUseSubskill(mmoPlayer, SubSkillType.UNARMED_STEEL_ARM_STYLE);
|
canIronArm = canUseSubskill(mmoPlayer, SubSkillType.UNARMED_STEEL_ARM_STYLE);
|
||||||
canDeflect = canUseSubskill(mmoPlayer, SubSkillType.UNARMED_ARROW_DEFLECT);
|
canDeflect = canUseSubskill(mmoPlayer, SubSkillType.UNARMED_ARROW_DEFLECT);
|
||||||
@ -83,7 +83,7 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
if (canDeflect) {
|
if (canDeflect) {
|
||||||
@ -123,7 +123,7 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.UNARMED);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.UNARMED);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -33,7 +33,7 @@ public class WoodcuttingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(@NotNull McMMOPlayer mmoPlayer, float skillValue) {
|
protected void dataCalculations(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue) {
|
||||||
// DOUBLE DROPS
|
// DOUBLE DROPS
|
||||||
if (canDoubleDrop) {
|
if (canDoubleDrop) {
|
||||||
setDoubleDropClassicChanceStrings(mmoPlayer);
|
setDoubleDropClassicChanceStrings(mmoPlayer);
|
||||||
@ -47,14 +47,14 @@ public class WoodcuttingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setDoubleDropClassicChanceStrings(McMMOPlayer mmoPlayer) {
|
private void setDoubleDropClassicChanceStrings(OnlineMMOPlayer mmoPlayer) {
|
||||||
String[] doubleDropStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, mmoPlayer, SubSkillType.WOODCUTTING_HARVEST_LUMBER);
|
String[] doubleDropStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, mmoPlayer, SubSkillType.WOODCUTTING_HARVEST_LUMBER);
|
||||||
doubleDropChance = doubleDropStrings[0];
|
doubleDropChance = doubleDropStrings[0];
|
||||||
doubleDropChanceLucky = doubleDropStrings[1];
|
doubleDropChanceLucky = doubleDropStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(@NotNull McMMOPlayer mmoPlayer) {
|
protected void permissionsCheck(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
canTreeFell = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.WOODCUTTING_TREE_FELLER) && Permissions.treeFeller(mmoPlayer.getPlayer());
|
canTreeFell = RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.WOODCUTTING_TREE_FELLER) && Permissions.treeFeller(mmoPlayer.getPlayer());
|
||||||
canDoubleDrop = canUseSubskill(mmoPlayer, SubSkillType.WOODCUTTING_HARVEST_LUMBER) && !skill.getDoubleDropsDisabled() && RankUtils.getRank(mmoPlayer, SubSkillType.WOODCUTTING_HARVEST_LUMBER) >= 1;
|
canDoubleDrop = canUseSubskill(mmoPlayer, SubSkillType.WOODCUTTING_HARVEST_LUMBER) && !skill.getDoubleDropsDisabled() && RankUtils.getRank(mmoPlayer, SubSkillType.WOODCUTTING_HARVEST_LUMBER) >= 1;
|
||||||
canLeafBlow = canUseSubskill(mmoPlayer, SubSkillType.WOODCUTTING_LEAF_BLOWER);
|
canLeafBlow = canUseSubskill(mmoPlayer, SubSkillType.WOODCUTTING_LEAF_BLOWER);
|
||||||
@ -65,7 +65,7 @@ public class WoodcuttingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<String> statsDisplay(@NotNull McMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected @NotNull List<String> statsDisplay(@NotNull OnlineMMOPlayer mmoPlayer, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
if (canDoubleDrop) {
|
if (canDoubleDrop) {
|
||||||
@ -98,7 +98,7 @@ public class WoodcuttingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull List<Component> getTextComponents(@NotNull McMMOPlayer mmoPlayer) {
|
protected @NotNull List<Component> getTextComponents(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Component> textComponents = new ArrayList<>();
|
List<Component> textComponents = new ArrayList<>();
|
||||||
|
|
||||||
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.WOODCUTTING);
|
TextComponentFactory.getSubSkillTextComponents(mmoPlayer, textComponents, PrimarySkillType.WOODCUTTING);
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.datatypes.experience;
|
|||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.player.PersistentPlayerData;
|
import com.gmail.nossr50.datatypes.player.PersistentPlayerData;
|
||||||
import com.gmail.nossr50.datatypes.skills.CoreSkillConstants;
|
import com.gmail.nossr50.datatypes.skills.CoreSkillConstants;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
@ -30,9 +30,9 @@ public class ExperienceManager {
|
|||||||
private boolean isUsingUnarmed = false;
|
private boolean isUsingUnarmed = false;
|
||||||
|
|
||||||
private final @NotNull PersistentPlayerData persistentPlayerDataRef;
|
private final @NotNull PersistentPlayerData persistentPlayerDataRef;
|
||||||
private @Nullable McMMOPlayer mmoPlayer;
|
private @Nullable OnlineMMOPlayer mmoPlayer;
|
||||||
|
|
||||||
public ExperienceManager(@NotNull McMMOPlayer mmoPlayer) {
|
public ExperienceManager(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
this.mmoPlayer = mmoPlayer;
|
this.mmoPlayer = mmoPlayer;
|
||||||
this.persistentPlayerDataRef = mmoPlayer.getPersistentPlayerData();
|
this.persistentPlayerDataRef = mmoPlayer.getPersistentPlayerData();
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.datatypes.party;
|
|||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.dirtydata.DirtySet;
|
import com.gmail.nossr50.datatypes.dirtydata.DirtySet;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.neetgames.mcmmo.exceptions.InvalidPlayerException;
|
import com.neetgames.mcmmo.exceptions.InvalidPlayerException;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
@ -163,7 +163,7 @@ public class PartyMemberManager {
|
|||||||
* @param mmoPlayer The player to check
|
* @param mmoPlayer The player to check
|
||||||
* @return the near party members
|
* @return the near party members
|
||||||
*/
|
*/
|
||||||
public @NotNull List<Player> getNearMembers(@NotNull McMMOPlayer mmoPlayer) {
|
public @NotNull List<Player> getNearMembers(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Player> nearMembers = new ArrayList<>();
|
List<Player> nearMembers = new ArrayList<>();
|
||||||
Party party = mmoPlayer.getParty();
|
Party party = mmoPlayer.getParty();
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ public class McMMOPlayer extends PlayerProfile implements OnlineMMOPlayer, Ident
|
|||||||
private final @NotNull AbilityActivationProcessor abilityActivationProcessor;
|
private final @NotNull AbilityActivationProcessor abilityActivationProcessor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new {@link McMMOPlayer} with default values for a {@link Player}
|
* Create a new {@link OnlineMMOPlayer} with default values for a {@link Player}
|
||||||
* @param player target player
|
* @param player target player
|
||||||
*/
|
*/
|
||||||
public McMMOPlayer(@NotNull Player player) {
|
public McMMOPlayer(@NotNull Player player) {
|
||||||
|
@ -4,7 +4,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
|||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@ -65,7 +65,7 @@ public class Roll extends AcrobaticsSubSkill {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (entityDamageEvent.getCause() == EntityDamageEvent.DamageCause.FALL) {//Grab the player
|
if (entityDamageEvent.getCause() == EntityDamageEvent.DamageCause.FALL) {//Grab the player
|
||||||
McMMOPlayer mmoPlayer = EventUtils.getMcMMOPlayer(entityDamageEvent.getEntity());
|
OnlineMMOPlayer mmoPlayer = EventUtils.getMcMMOPlayer(entityDamageEvent.getEntity());
|
||||||
|
|
||||||
if (mmoPlayer == null)
|
if (mmoPlayer == null)
|
||||||
return false;
|
return false;
|
||||||
@ -119,7 +119,7 @@ public class Roll extends AcrobaticsSubSkill {
|
|||||||
String rollChance, rollChanceLucky, gracefulRollChance, gracefulRollChanceLucky;
|
String rollChance, rollChanceLucky, gracefulRollChance, gracefulRollChanceLucky;
|
||||||
|
|
||||||
/* Values related to the player */
|
/* Values related to the player */
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
float skillValue = mmoPlayer.getExperienceManager().getSkillLevel(getPrimarySkill());
|
float skillValue = mmoPlayer.getExperienceManager().getSkillLevel(getPrimarySkill());
|
||||||
boolean isLucky = Permissions.lucky(player, getPrimarySkill());
|
boolean isLucky = Permissions.lucky(player, getPrimarySkill());
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ public class Roll extends AcrobaticsSubSkill {
|
|||||||
* @param damage The amount of damage initially dealt by the event
|
* @param damage The amount of damage initially dealt by the event
|
||||||
* @return the modified event damage if the ability was successful, the original event damage otherwise
|
* @return the modified event damage if the ability was successful, the original event damage otherwise
|
||||||
*/
|
*/
|
||||||
private double rollCheck(Player player, McMMOPlayer mmoPlayer, double damage) {
|
private double rollCheck(Player player, OnlineMMOPlayer mmoPlayer, double damage) {
|
||||||
|
|
||||||
int skillLevel = mmoPlayer.getExperienceManager().getSkillLevel(getPrimarySkill());
|
int skillLevel = mmoPlayer.getExperienceManager().getSkillLevel(getPrimarySkill());
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ public class Roll extends AcrobaticsSubSkill {
|
|||||||
return damage;
|
return damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getActivationChance(McMMOPlayer mmoPlayer) {
|
private int getActivationChance(OnlineMMOPlayer mmoPlayer) {
|
||||||
return PerksUtils.handleLuckyPerks(mmoPlayer.getPlayer(), getPrimarySkill());
|
return PerksUtils.handleLuckyPerks(mmoPlayer.getPlayer(), getPrimarySkill());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,7 +231,7 @@ public class Roll extends AcrobaticsSubSkill {
|
|||||||
* @param damage The amount of damage initially dealt by the event
|
* @param damage The amount of damage initially dealt by the event
|
||||||
* @return the modified event damage if the ability was successful, the original event damage otherwise
|
* @return the modified event damage if the ability was successful, the original event damage otherwise
|
||||||
*/
|
*/
|
||||||
private double gracefulRollCheck(Player player, McMMOPlayer mmoPlayer, double damage, int skillLevel) {
|
private double gracefulRollCheck(Player player, OnlineMMOPlayer mmoPlayer, double damage, int skillLevel) {
|
||||||
double modifiedDamage = calculateModifiedRollDamage(damage, AdvancedConfig.getInstance().getRollDamageThreshold() * 2);
|
double modifiedDamage = calculateModifiedRollDamage(damage, AdvancedConfig.getInstance().getRollDamageThreshold() * 2);
|
||||||
|
|
||||||
RandomChanceSkill rcs = new RandomChanceSkill(player, subSkillType);
|
RandomChanceSkill rcs = new RandomChanceSkill(player, subSkillType);
|
||||||
@ -269,7 +269,7 @@ public class Roll extends AcrobaticsSubSkill {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if (ItemUtils.hasItemInEitherHand(player, Material.ENDER_PEARL) || player.isInsideVehicle()) {
|
if (ItemUtils.hasItemInEitherHand(player, Material.ENDER_PEARL) || player.isInsideVehicle()) {
|
||||||
if(mmoPlayer.isDebugMode()) {
|
if(mmoPlayer.isDebugMode()) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.datatypes.skills.subskills.interfaces;
|
package com.gmail.nossr50.datatypes.skills.subskills.interfaces;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.interfaces.Skill;
|
import com.gmail.nossr50.datatypes.skills.interfaces.Skill;
|
||||||
import net.kyori.adventure.text.TextComponent;
|
import net.kyori.adventure.text.TextComponent;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -63,7 +63,7 @@ public interface SubSkill extends Skill {
|
|||||||
* @param componentBuilder target component builder
|
* @param componentBuilder target component builder
|
||||||
* @param mmoPlayer owner of this skill
|
* @param mmoPlayer owner of this skill
|
||||||
*/
|
*/
|
||||||
void addStats(TextComponent.Builder componentBuilder, @NotNull McMMOPlayer mmoPlayer);
|
void addStats(TextComponent.Builder componentBuilder, @NotNull OnlineMMOPlayer mmoPlayer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not this subskill is enabled
|
* Whether or not this subskill is enabled
|
||||||
|
@ -6,7 +6,7 @@ import com.gmail.nossr50.config.HiddenConfig;
|
|||||||
import com.gmail.nossr50.config.WorldBlacklist;
|
import com.gmail.nossr50.config.WorldBlacklist;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.meta.BonusDropMeta;
|
import com.gmail.nossr50.datatypes.meta.BonusDropMeta;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.AbilityToolType;
|
import com.gmail.nossr50.datatypes.skills.AbilityToolType;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||||
@ -220,7 +220,7 @@ public class BlockListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if(mmoPlayer == null)
|
if(mmoPlayer == null)
|
||||||
return;
|
return;
|
||||||
@ -300,7 +300,7 @@ public class BlockListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
//Check if profile is loaded
|
//Check if profile is loaded
|
||||||
if(mmoPlayer == null) {
|
if(mmoPlayer == null) {
|
||||||
@ -461,7 +461,7 @@ public class BlockListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
//Profile not loaded
|
//Profile not loaded
|
||||||
if(mmoPlayer == null)
|
if(mmoPlayer == null)
|
||||||
@ -547,7 +547,7 @@ public class BlockListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
//Profile not loaded
|
//Profile not loaded
|
||||||
if(mcMMO.getUserManager().queryPlayer(player) == null)
|
if(mcMMO.getUserManager().queryPlayer(player) == null)
|
||||||
@ -594,7 +594,7 @@ public class BlockListener implements Listener {
|
|||||||
@EventHandler(priority = EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void onBlockDamageCleanup(BlockDamageEvent event) {
|
public void onBlockDamageCleanup(BlockDamageEvent event) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
//Profile not loaded
|
//Profile not loaded
|
||||||
if(mcMMO.getUserManager().queryPlayer(player) == null)
|
if(mcMMO.getUserManager().queryPlayer(player) == null)
|
||||||
@ -666,7 +666,7 @@ public class BlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cleanupAbilityTools(Player player, McMMOPlayer mmoPlayer, BlockState blockState, ItemStack heldItem) {
|
private void cleanupAbilityTools(Player player, OnlineMMOPlayer mmoPlayer, BlockState blockState, ItemStack heldItem) {
|
||||||
if (HiddenConfig.getInstance().useEnchantmentBuffs()) {
|
if (HiddenConfig.getInstance().useEnchantmentBuffs()) {
|
||||||
if ((ItemUtils.isPickaxe(heldItem) && !mmoPlayer.getSuperAbilityManager().getAbilityMode(SuperAbilityType.SUPER_BREAKER)) || (ItemUtils.isShovel(heldItem) && !mmoPlayer.getSuperAbilityManager().getAbilityMode(SuperAbilityType.GIGA_DRILL_BREAKER))) {
|
if ((ItemUtils.isPickaxe(heldItem) && !mmoPlayer.getSuperAbilityManager().getAbilityMode(SuperAbilityType.SUPER_BREAKER)) || (ItemUtils.isShovel(heldItem) && !mmoPlayer.getSuperAbilityManager().getAbilityMode(SuperAbilityType.GIGA_DRILL_BREAKER))) {
|
||||||
SkillUtils.removeAbilityBuff(heldItem);
|
SkillUtils.removeAbilityBuff(heldItem);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//package com.gmail.nossr50.listeners;
|
//package com.gmail.nossr50.listeners;
|
||||||
//
|
//
|
||||||
//import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
//import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
//import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
//import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||||
//import com.gmail.nossr50.mcMMO;
|
//import com.gmail.nossr50.mcMMO;
|
||||||
//import com.gmail.nossr50.util.player.UserManager;
|
//import com.gmail.nossr50.util.player.UserManager;
|
||||||
@ -26,7 +26,7 @@
|
|||||||
//
|
//
|
||||||
// SkillUtils.removeAbilityBoostsFromInventory(player);
|
// SkillUtils.removeAbilityBoostsFromInventory(player);
|
||||||
//
|
//
|
||||||
// McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
// OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
//
|
//
|
||||||
// if(mmoPlayer == null)
|
// if(mmoPlayer == null)
|
||||||
// return;
|
// return;
|
||||||
|
@ -5,7 +5,7 @@ import com.gmail.nossr50.config.Config;
|
|||||||
import com.gmail.nossr50.config.WorldBlacklist;
|
import com.gmail.nossr50.config.WorldBlacklist;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.meta.ProjectileOriginMeta;
|
import com.gmail.nossr50.datatypes.meta.ProjectileOriginMeta;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.subskills.interfaces.InteractType;
|
import com.gmail.nossr50.datatypes.skills.subskills.interfaces.InteractType;
|
||||||
@ -192,7 +192,7 @@ public class EntityListener implements Listener {
|
|||||||
|
|
||||||
//Crossbow only
|
//Crossbow only
|
||||||
if (isCrossbow) {
|
if (isCrossbow) {
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
//Process launch event
|
//Process launch event
|
||||||
if (Permissions.skillEnabled(player, PrimarySkillType.CROSSBOWS)) {
|
if (Permissions.skillEnabled(player, PrimarySkillType.CROSSBOWS)) {
|
||||||
@ -409,7 +409,7 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Deflect checks
|
//Deflect checks
|
||||||
final McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(defendingPlayer);
|
final OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(defendingPlayer);
|
||||||
if (mmoPlayer != null) {
|
if (mmoPlayer != null) {
|
||||||
UnarmedManager unarmedManager = mmoPlayer.getUnarmedManager();
|
UnarmedManager unarmedManager = mmoPlayer.getUnarmedManager();
|
||||||
|
|
||||||
@ -566,7 +566,7 @@ public class EntityListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
//Profile not loaded
|
//Profile not loaded
|
||||||
if(mmoPlayer == null)
|
if(mmoPlayer == null)
|
||||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.listeners;
|
|||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.WorldBlacklist;
|
import com.gmail.nossr50.config.WorldBlacklist;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.events.fake.FakeBrewEvent;
|
import com.gmail.nossr50.events.fake.FakeBrewEvent;
|
||||||
@ -111,7 +111,7 @@ public class InventoryListener implements Listener {
|
|||||||
|
|
||||||
if(offlinePlayer != null) {
|
if(offlinePlayer != null) {
|
||||||
|
|
||||||
McMMOPlayer offlineProfile = mcMMO.getUserManager().queryOfflineMcMMOPlayer(offlinePlayer);
|
OnlineMMOPlayer offlineProfile = mcMMO.getUserManager().queryOfflineMcMMOPlayer(offlinePlayer);
|
||||||
|
|
||||||
//Profile doesn't exist
|
//Profile doesn't exist
|
||||||
if(offlineProfile != null) {
|
if(offlineProfile != null) {
|
||||||
|
@ -4,7 +4,7 @@ import com.gmail.nossr50.config.Config;
|
|||||||
import com.gmail.nossr50.config.WorldBlacklist;
|
import com.gmail.nossr50.config.WorldBlacklist;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -204,7 +204,7 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
mmoPlayer.checkGodMode();
|
mmoPlayer.checkGodMode();
|
||||||
mmoPlayer.checkParty();
|
mmoPlayer.checkParty();
|
||||||
@ -462,7 +462,7 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
Item drop = event.getItem();
|
Item drop = event.getItem();
|
||||||
ItemStack dropStack = drop.getItemStack();
|
ItemStack dropStack = drop.getItemStack();
|
||||||
@ -525,7 +525,7 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//No need for null checks here
|
//No need for null checks here
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
//TODO: There's an issue with using Async saves on player quit
|
//TODO: There's an issue with using Async saves on player quit
|
||||||
//TODO: Basically there are conditions in which an async task does not execute fast enough to save the data if the server shutdown shortly after this task was scheduled
|
//TODO: Basically there are conditions in which an async task does not execute fast enough to save the data if the server shutdown shortly after this task was scheduled
|
||||||
mcMMO.getUserManager().saveUserWithDelay(mmoPlayer.getPersistentPlayerData(), false, 20);
|
mcMMO.getUserManager().saveUserWithDelay(mmoPlayer.getPersistentPlayerData(), false, 20);
|
||||||
@ -628,7 +628,7 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
MiningManager miningManager = mmoPlayer.getMiningManager();
|
MiningManager miningManager = mmoPlayer.getMiningManager();
|
||||||
ItemStack heldItem = player.getInventory().getItemInMainHand();
|
ItemStack heldItem = player.getInventory().getItemInMainHand();
|
||||||
|
|
||||||
@ -744,7 +744,7 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
ItemStack heldItem = player.getInventory().getItemInMainHand();
|
ItemStack heldItem = player.getInventory().getItemInMainHand();
|
||||||
|
|
||||||
//Spam Fishing Detection
|
//Spam Fishing Detection
|
||||||
@ -779,7 +779,7 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if (mmoPlayer == null) {
|
if (mmoPlayer == null) {
|
||||||
mcMMO.p.debug(player.getName() + "is chatting, but is currently not logged in to the server.");
|
mcMMO.p.debug(player.getName() + "is chatting, but is currently not logged in to the server.");
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.listeners;
|
|||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.events.experience.McMMOPlayerLevelUpEvent;
|
import com.gmail.nossr50.events.experience.McMMOPlayerLevelUpEvent;
|
||||||
import com.gmail.nossr50.events.experience.McMMOPlayerXpGainEvent;
|
import com.gmail.nossr50.events.experience.McMMOPlayerXpGainEvent;
|
||||||
@ -81,7 +81,7 @@ public class SelfListener implements Listener {
|
|||||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
||||||
public void onPlayerXpGain(McMMOPlayerXpGainEvent event) {
|
public void onPlayerXpGain(McMMOPlayerXpGainEvent event) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
PrimarySkillType primarySkillType = event.getSkill();
|
PrimarySkillType primarySkillType = event.getSkill();
|
||||||
|
|
||||||
if(mmoPlayer.isDebugMode()) {
|
if(mmoPlayer.isDebugMode()) {
|
||||||
|
@ -8,7 +8,7 @@ import com.gmail.nossr50.datatypes.party.ItemShareType;
|
|||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.party.PartyMember;
|
import com.gmail.nossr50.datatypes.party.PartyMember;
|
||||||
import com.gmail.nossr50.datatypes.party.ShareMode;
|
import com.gmail.nossr50.datatypes.party.ShareMode;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.events.party.McMMOPartyAllianceChangeEvent;
|
import com.gmail.nossr50.events.party.McMMOPartyAllianceChangeEvent;
|
||||||
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent;
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent;
|
||||||
@ -113,7 +113,7 @@ public final class PartyManager {
|
|||||||
* @param newPartyName The name of the party being joined
|
* @param newPartyName The name of the party being joined
|
||||||
* @return true if the party was joined successfully, false otherwise
|
* @return true if the party was joined successfully, false otherwise
|
||||||
*/
|
*/
|
||||||
public boolean changeOrJoinParty(@NotNull McMMOPlayer mmoPlayer, @NotNull String newPartyName) {
|
public boolean changeOrJoinParty(@NotNull OnlineMMOPlayer mmoPlayer, @NotNull String newPartyName) {
|
||||||
Player player = mmoPlayer.getPlayer();
|
Player player = mmoPlayer.getPlayer();
|
||||||
|
|
||||||
if (inParty(mmoPlayer)) {
|
if (inParty(mmoPlayer)) {
|
||||||
@ -166,7 +166,7 @@ public final class PartyManager {
|
|||||||
* @param mmoPlayer The player to check
|
* @param mmoPlayer The player to check
|
||||||
* @return the near party members
|
* @return the near party members
|
||||||
*/
|
*/
|
||||||
public List<Player> getNearMembers(McMMOPlayer mmoPlayer) {
|
public List<Player> getNearMembers(OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Player> nearMembers = new ArrayList<>();
|
List<Player> nearMembers = new ArrayList<>();
|
||||||
Party party = mmoPlayer.getParty();
|
Party party = mmoPlayer.getParty();
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ public final class PartyManager {
|
|||||||
return nearMembers;
|
return nearMembers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Player> getNearVisibleMembers(@NotNull McMMOPlayer mmoPlayer) {
|
public List<Player> getNearVisibleMembers(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
List<Player> nearMembers = new ArrayList<>();
|
List<Player> nearMembers = new ArrayList<>();
|
||||||
Party party = mmoPlayer.getParty();
|
Party party = mmoPlayer.getParty();
|
||||||
|
|
||||||
@ -310,7 +310,7 @@ public final class PartyManager {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
return mmoPlayer.getParty();
|
return mmoPlayer.getParty();
|
||||||
}
|
}
|
||||||
@ -358,7 +358,7 @@ public final class PartyManager {
|
|||||||
*
|
*
|
||||||
* @param mmoPlayer The player to remove
|
* @param mmoPlayer The player to remove
|
||||||
*/
|
*/
|
||||||
public void removeFromParty(McMMOPlayer mmoPlayer) {
|
public void removeFromParty(OnlineMMOPlayer mmoPlayer) {
|
||||||
removeFromParty(mmoPlayer.getPlayer(), mmoPlayer.getParty());
|
removeFromParty(mmoPlayer.getPlayer(), mmoPlayer.getParty());
|
||||||
processPartyLeaving(mmoPlayer);
|
processPartyLeaving(mmoPlayer);
|
||||||
}
|
}
|
||||||
@ -395,7 +395,7 @@ public final class PartyManager {
|
|||||||
* @param partyName The party to add the player to
|
* @param partyName The party to add the player to
|
||||||
* @param password The password for this party, null if there was no password
|
* @param password The password for this party, null if there was no password
|
||||||
*/
|
*/
|
||||||
public void createParty(McMMOPlayer mmoPlayer, String partyName, String password) {
|
public void createParty(OnlineMMOPlayer mmoPlayer, String partyName, String password) {
|
||||||
Player player = mmoPlayer.getPlayer();
|
Player player = mmoPlayer.getPlayer();
|
||||||
|
|
||||||
Party party = new Party(new PartyLeader(player.getUniqueId(), player.getName()), partyName.replace(".", ""), password);
|
Party party = new Party(new PartyLeader(player.getUniqueId(), player.getName()), partyName.replace(".", ""), password);
|
||||||
@ -446,7 +446,7 @@ public final class PartyManager {
|
|||||||
*
|
*
|
||||||
* @param mmoPlayer The player to add to the party
|
* @param mmoPlayer The player to add to the party
|
||||||
*/
|
*/
|
||||||
public void joinInvitedParty(McMMOPlayer mmoPlayer) {
|
public void joinInvitedParty(OnlineMMOPlayer mmoPlayer) {
|
||||||
Party invite = mmoPlayer.getPartyInvite();
|
Party invite = mmoPlayer.getPartyInvite();
|
||||||
|
|
||||||
// Check if the party still exists, it might have been disbanded
|
// Check if the party still exists, it might have been disbanded
|
||||||
@ -474,7 +474,7 @@ public final class PartyManager {
|
|||||||
*
|
*
|
||||||
* @param mmoPlayer The player who accepts the alliance invite
|
* @param mmoPlayer The player who accepts the alliance invite
|
||||||
*/
|
*/
|
||||||
public void acceptAllianceInvite(McMMOPlayer mmoPlayer) {
|
public void acceptAllianceInvite(OnlineMMOPlayer mmoPlayer) {
|
||||||
Party invite = mmoPlayer.getPartyAllianceInvite();
|
Party invite = mmoPlayer.getPartyAllianceInvite();
|
||||||
Player player = mmoPlayer.getPlayer();
|
Player player = mmoPlayer.getPlayer();
|
||||||
|
|
||||||
@ -535,7 +535,7 @@ public final class PartyManager {
|
|||||||
* @param mmoPlayer The player to add to the party
|
* @param mmoPlayer The player to add to the party
|
||||||
* @param party The party
|
* @param party The party
|
||||||
*/
|
*/
|
||||||
public void addToParty(McMMOPlayer mmoPlayer, Party party) {
|
public void addToParty(OnlineMMOPlayer mmoPlayer, Party party) {
|
||||||
Player player = mmoPlayer.getPlayer();
|
Player player = mmoPlayer.getPlayer();
|
||||||
String playerName = player.getName();
|
String playerName = player.getName();
|
||||||
|
|
||||||
@ -588,7 +588,7 @@ public final class PartyManager {
|
|||||||
*
|
*
|
||||||
* @return true if the player can invite
|
* @return true if the player can invite
|
||||||
*/
|
*/
|
||||||
public boolean canInvite(McMMOPlayer mmoPlayer) {
|
public boolean canInvite(OnlineMMOPlayer mmoPlayer) {
|
||||||
Party party = mmoPlayer.getParty();
|
Party party = mmoPlayer.getParty();
|
||||||
|
|
||||||
return !party.isLocked() || party.getLeader().getUniqueId().equals(mmoPlayer.getPlayer().getUniqueId());
|
return !party.isLocked() || party.getLeader().getUniqueId().equals(mmoPlayer.getPlayer().getUniqueId());
|
||||||
@ -813,7 +813,7 @@ public final class PartyManager {
|
|||||||
*
|
*
|
||||||
* @param mmoPlayer The player to remove party data from.
|
* @param mmoPlayer The player to remove party data from.
|
||||||
*/
|
*/
|
||||||
public void processPartyLeaving(@NotNull McMMOPlayer mmoPlayer) {
|
public void processPartyLeaving(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
mmoPlayer.removeParty();
|
mmoPlayer.removeParty();
|
||||||
mmoPlayer.setChatMode(ChatChannel.NONE);
|
mmoPlayer.setChatMode(ChatChannel.NONE);
|
||||||
mmoPlayer.setItemShareModifier(10);
|
mmoPlayer.setItemShareModifier(10);
|
||||||
|
@ -7,7 +7,7 @@ import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
|||||||
import com.gmail.nossr50.datatypes.party.ItemShareType;
|
import com.gmail.nossr50.datatypes.party.ItemShareType;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.party.ShareMode;
|
import com.gmail.nossr50.datatypes.party.ShareMode;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
@ -29,7 +29,7 @@ public final class ShareHandler {
|
|||||||
* @param primarySkillType Skill being used
|
* @param primarySkillType Skill being used
|
||||||
* @return True is the xp has been shared
|
* @return True is the xp has been shared
|
||||||
*/
|
*/
|
||||||
public static boolean handleXpShare(float xp, @NotNull McMMOPlayer mmoPlayer, @NotNull Party party, @NotNull PrimarySkillType primarySkillType, @NotNull XPGainReason xpGainReason) {
|
public static boolean handleXpShare(float xp, @NotNull OnlineMMOPlayer mmoPlayer, @NotNull Party party, @NotNull PrimarySkillType primarySkillType, @NotNull XPGainReason xpGainReason) {
|
||||||
|
|
||||||
if (party.getPartyExperienceManager().getXpShareMode() != ShareMode.EQUAL) {
|
if (party.getPartyExperienceManager().getXpShareMode() != ShareMode.EQUAL) {
|
||||||
return false;
|
return false;
|
||||||
@ -48,7 +48,7 @@ public final class ShareHandler {
|
|||||||
float splitXp = (float) (xp / partySize * shareBonus);
|
float splitXp = (float) (xp / partySize * shareBonus);
|
||||||
|
|
||||||
for (Player otherMember : nearMembers) {
|
for (Player otherMember : nearMembers) {
|
||||||
McMMOPlayer partyMember = mcMMO.getUserManager().queryPlayer(otherMember);
|
OnlineMMOPlayer partyMember = mcMMO.getUserManager().queryPlayer(otherMember);
|
||||||
|
|
||||||
//Profile not loaded
|
//Profile not loaded
|
||||||
if(partyMember == null) {
|
if(partyMember == null) {
|
||||||
@ -68,7 +68,7 @@ public final class ShareHandler {
|
|||||||
* @param mmoPlayer Player who picked up the item
|
* @param mmoPlayer Player who picked up the item
|
||||||
* @return True if the item has been shared
|
* @return True if the item has been shared
|
||||||
*/
|
*/
|
||||||
public static boolean handleItemShare(Item drop, McMMOPlayer mmoPlayer) {
|
public static boolean handleItemShare(Item drop, OnlineMMOPlayer mmoPlayer) {
|
||||||
ItemStack itemStack = drop.getItemStack();
|
ItemStack itemStack = drop.getItemStack();
|
||||||
ItemShareType dropType = ItemShareType.getShareType(itemStack);
|
ItemShareType dropType = ItemShareType.getShareType(itemStack);
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ public final class ShareHandler {
|
|||||||
int highestRoll = 0;
|
int highestRoll = 0;
|
||||||
|
|
||||||
for (Player member : nearMembers) {
|
for (Player member : nearMembers) {
|
||||||
McMMOPlayer mcMMOMember = mcMMO.getUserManager().getPlayer(member);
|
OnlineMMOPlayer mcMMOMember = mcMMO.getUserManager().getPlayer(member);
|
||||||
|
|
||||||
//Profile not loaded
|
//Profile not loaded
|
||||||
if(mcMMO.getUserManager().getPlayer(member) == null)
|
if(mcMMO.getUserManager().getPlayer(member) == null)
|
||||||
@ -130,14 +130,14 @@ public final class ShareHandler {
|
|||||||
highestRoll = diceRoll;
|
highestRoll = diceRoll;
|
||||||
|
|
||||||
if (winningPlayer != null) {
|
if (winningPlayer != null) {
|
||||||
McMMOPlayer mcMMOWinning = mcMMO.getUserManager().getPlayer(winningPlayer);
|
OnlineMMOPlayer mcMMOWinning = mcMMO.getUserManager().getPlayer(winningPlayer);
|
||||||
mcMMOWinning.setItemShareModifier(mcMMOWinning.getItemShareModifier() + itemWeight);
|
mcMMOWinning.setItemShareModifier(mcMMOWinning.getItemShareModifier() + itemWeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
winningPlayer = member;
|
winningPlayer = member;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mcMMOTarget = mcMMO.getUserManager().getPlayer(winningPlayer);
|
OnlineMMOPlayer mcMMOTarget = mcMMO.getUserManager().getPlayer(winningPlayer);
|
||||||
mcMMOTarget.setItemShareModifier(mcMMOTarget.getItemShareModifier() - itemWeight);
|
mcMMOTarget.setItemShareModifier(mcMMOTarget.getItemShareModifier() - itemWeight);
|
||||||
awardDrop(winningPlayer, newStack);
|
awardDrop(winningPlayer, newStack);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.runnables;
|
package com.gmail.nossr50.runnables;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ public class SaveTimerTask extends BukkitRunnable {
|
|||||||
int count = 1;
|
int count = 1;
|
||||||
|
|
||||||
//TODO: write a more efficient bulk save
|
//TODO: write a more efficient bulk save
|
||||||
for (McMMOPlayer mmoPlayer : mcMMO.getUserManager().getPlayers()) {
|
for (OnlineMMOPlayer mmoPlayer : mcMMO.getUserManager().getPlayers()) {
|
||||||
mcMMO.getUserManager().saveUserWithDelay(mmoPlayer.getPersistentPlayerData(), false, count);
|
mcMMO.getUserManager().saveUserWithDelay(mmoPlayer.getPersistentPlayerData(), false, count);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.runnables.database;
|
|||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.database.DatabaseManager;
|
import com.gmail.nossr50.database.DatabaseManager;
|
||||||
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -26,7 +26,7 @@ public class FormulaConversionTask extends BukkitRunnable {
|
|||||||
int convertedUsers = 0;
|
int convertedUsers = 0;
|
||||||
long startMillis = System.currentTimeMillis();
|
long startMillis = System.currentTimeMillis();
|
||||||
for (String playerName : mcMMO.getDatabaseManager().getStoredUsers()) {
|
for (String playerName : mcMMO.getDatabaseManager().getStoredUsers()) {
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayerName(playerName);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayerName(playerName);
|
||||||
PlayerProfile profile;
|
PlayerProfile profile;
|
||||||
|
|
||||||
// If the mmoPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
// If the mmoPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.runnables.items;
|
package com.gmail.nossr50.runnables.items;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.ChimaeraWing;
|
import com.gmail.nossr50.util.ChimaeraWing;
|
||||||
import com.gmail.nossr50.util.ItemUtils;
|
import com.gmail.nossr50.util.ItemUtils;
|
||||||
@ -13,9 +13,9 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
public class ChimaeraWingWarmup extends BukkitRunnable {
|
public class ChimaeraWingWarmup extends BukkitRunnable {
|
||||||
private final McMMOPlayer mmoPlayer;
|
private final OnlineMMOPlayer mmoPlayer;
|
||||||
|
|
||||||
public ChimaeraWingWarmup(McMMOPlayer mmoPlayer) {
|
public ChimaeraWingWarmup(OnlineMMOPlayer mmoPlayer) {
|
||||||
this.mmoPlayer = mmoPlayer;
|
this.mmoPlayer = mmoPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.runnables.items;
|
package com.gmail.nossr50.runnables.items;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.EventUtils;
|
import com.gmail.nossr50.util.EventUtils;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
@ -13,10 +13,10 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
public class TeleportationWarmup extends BukkitRunnable {
|
public class TeleportationWarmup extends BukkitRunnable {
|
||||||
private final McMMOPlayer mmoPlayer;
|
private final OnlineMMOPlayer mmoPlayer;
|
||||||
private final McMMOPlayer mcMMOTarget;
|
private final OnlineMMOPlayer mcMMOTarget;
|
||||||
|
|
||||||
public TeleportationWarmup(McMMOPlayer mmoPlayer, McMMOPlayer mcMMOTarget) {
|
public TeleportationWarmup(OnlineMMOPlayer mmoPlayer, OnlineMMOPlayer mcMMOTarget) {
|
||||||
this.mmoPlayer = mmoPlayer;
|
this.mmoPlayer = mmoPlayer;
|
||||||
this.mcMMOTarget = mcMMOTarget;
|
this.mcMMOTarget = mcMMOTarget;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.gmail.nossr50.runnables.player;
|
package com.gmail.nossr50.runnables.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
public class ClearRegisteredXPGainTask extends BukkitRunnable {
|
public class ClearRegisteredXPGainTask extends BukkitRunnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
for (McMMOPlayer mmoPlayer : mcMMO.getUserManager().getPlayers()) {
|
for (OnlineMMOPlayer mmoPlayer : mcMMO.getUserManager().getPlayers()) {
|
||||||
mmoPlayer.purgeExpiredXpGains();
|
mmoPlayer.purgeExpiredXpGains();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.runnables.player;
|
package com.gmail.nossr50.runnables.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@ -43,7 +43,7 @@ public class PlayerProfileLoadingTask extends BukkitRunnable {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
PlayerProfile profile = mcMMO.getDatabaseManager().queryPlayerDataByUUID(player.getUniqueId());
|
PlayerProfile profile = mcMMO.getDatabaseManager().queryPlayerDataByUUID(player.getUniqueId());
|
||||||
new ApplySuccessfulProfile(new McMMOPlayer(player, profile)).runTask(mcMMO.p);
|
new ApplySuccessfulProfile(new OnlineMMOPlayer(player, profile)).runTask(mcMMO.p);
|
||||||
EventUtils.callPlayerProfileLoadEvent(player, profile);
|
EventUtils.callPlayerProfileLoadEvent(player, profile);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -70,9 +70,9 @@ public class PlayerProfileLoadingTask extends BukkitRunnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class ApplySuccessfulProfile extends BukkitRunnable {
|
private class ApplySuccessfulProfile extends BukkitRunnable {
|
||||||
private final McMMOPlayer mmoPlayer;
|
private final OnlineMMOPlayer mmoPlayer;
|
||||||
|
|
||||||
private ApplySuccessfulProfile(McMMOPlayer mmoPlayer) {
|
private ApplySuccessfulProfile(OnlineMMOPlayer mmoPlayer) {
|
||||||
this.mmoPlayer = mmoPlayer;
|
this.mmoPlayer = mmoPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
package com.gmail.nossr50.runnables.skills;
|
package com.gmail.nossr50.runnables.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||||
import com.gmail.nossr50.util.player.NotificationManager;
|
import com.gmail.nossr50.util.player.NotificationManager;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
public class AbilityCooldownTask extends BukkitRunnable {
|
public class AbilityCooldownTask extends BukkitRunnable {
|
||||||
private final McMMOPlayer mmoPlayer;
|
private final OnlineMMOPlayer mmoPlayer;
|
||||||
private final SuperAbilityType ability;
|
private final SuperAbilityType ability;
|
||||||
|
|
||||||
public AbilityCooldownTask(McMMOPlayer mmoPlayer, SuperAbilityType ability) {
|
public AbilityCooldownTask(OnlineMMOPlayer mmoPlayer, SuperAbilityType ability) {
|
||||||
this.mmoPlayer = mmoPlayer;
|
this.mmoPlayer = mmoPlayer;
|
||||||
this.ability = ability;
|
this.ability = ability;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.runnables.skills;
|
|||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.EventUtils;
|
import com.gmail.nossr50.util.EventUtils;
|
||||||
@ -18,10 +18,10 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
public class AbilityDisableTask extends BukkitRunnable {
|
public class AbilityDisableTask extends BukkitRunnable {
|
||||||
private final McMMOPlayer mmoPlayer;
|
private final OnlineMMOPlayer mmoPlayer;
|
||||||
private final SuperAbilityType ability;
|
private final SuperAbilityType ability;
|
||||||
|
|
||||||
public AbilityDisableTask(McMMOPlayer mmoPlayer, SuperAbilityType ability) {
|
public AbilityDisableTask(OnlineMMOPlayer mmoPlayer, SuperAbilityType ability) {
|
||||||
this.mmoPlayer = mmoPlayer;
|
this.mmoPlayer = mmoPlayer;
|
||||||
this.ability = ability;
|
this.ability = ability;
|
||||||
}
|
}
|
||||||
|
@ -2,20 +2,20 @@ package com.gmail.nossr50.runnables.skills;
|
|||||||
|
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
public class AwardCombatXpTask extends BukkitRunnable {
|
public class AwardCombatXpTask extends BukkitRunnable {
|
||||||
private final McMMOPlayer mmoPlayer;
|
private final OnlineMMOPlayer mmoPlayer;
|
||||||
private final double baseXp;
|
private final double baseXp;
|
||||||
private final PrimarySkillType primarySkillType;
|
private final PrimarySkillType primarySkillType;
|
||||||
private final LivingEntity target;
|
private final LivingEntity target;
|
||||||
private final XPGainReason xpGainReason;
|
private final XPGainReason xpGainReason;
|
||||||
private final double baseHealth;
|
private final double baseHealth;
|
||||||
|
|
||||||
public AwardCombatXpTask(McMMOPlayer mmoPlayer, PrimarySkillType primarySkillType, double baseXp, LivingEntity target, XPGainReason xpGainReason) {
|
public AwardCombatXpTask(OnlineMMOPlayer mmoPlayer, PrimarySkillType primarySkillType, double baseXp, LivingEntity target, XPGainReason xpGainReason) {
|
||||||
this.mmoPlayer = mmoPlayer;
|
this.mmoPlayer = mmoPlayer;
|
||||||
this.primarySkillType = primarySkillType;
|
this.primarySkillType = primarySkillType;
|
||||||
this.baseXp = baseXp;
|
this.baseXp = baseXp;
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
package com.gmail.nossr50.runnables.skills;
|
package com.gmail.nossr50.runnables.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.BlockSnapshot;
|
import com.gmail.nossr50.datatypes.BlockSnapshot;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class DelayedHerbalismXPCheckTask extends BukkitRunnable {
|
public class DelayedHerbalismXPCheckTask extends BukkitRunnable {
|
||||||
|
|
||||||
private final McMMOPlayer mmoPlayer;
|
private final OnlineMMOPlayer mmoPlayer;
|
||||||
private final ArrayList<BlockSnapshot> chorusBlocks;
|
private final ArrayList<BlockSnapshot> chorusBlocks;
|
||||||
|
|
||||||
public DelayedHerbalismXPCheckTask(McMMOPlayer mmoPlayer, ArrayList<BlockSnapshot> chorusBlocks) {
|
public DelayedHerbalismXPCheckTask(OnlineMMOPlayer mmoPlayer, ArrayList<BlockSnapshot> chorusBlocks) {
|
||||||
this.mmoPlayer = mmoPlayer;
|
this.mmoPlayer = mmoPlayer;
|
||||||
this.chorusBlocks = chorusBlocks;
|
this.chorusBlocks = chorusBlocks;
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
package com.gmail.nossr50.runnables.skills;
|
package com.gmail.nossr50.runnables.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.util.experience.MMOExperienceBarManager;
|
import com.gmail.nossr50.util.experience.MMOExperienceBarManager;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
public class ExperienceBarHideTask extends BukkitRunnable {
|
public class ExperienceBarHideTask extends BukkitRunnable {
|
||||||
public final McMMOPlayer mmoPlayer;
|
public final OnlineMMOPlayer mmoPlayer;
|
||||||
public final PrimarySkillType primarySkillType;
|
public final PrimarySkillType primarySkillType;
|
||||||
public final MMOExperienceBarManager MMOExperienceBarManagerRef;
|
public final MMOExperienceBarManager MMOExperienceBarManagerRef;
|
||||||
|
|
||||||
public ExperienceBarHideTask(MMOExperienceBarManager MMOExperienceBarManagerRef, McMMOPlayer mmoPlayer, PrimarySkillType primarySkillType)
|
public ExperienceBarHideTask(MMOExperienceBarManager MMOExperienceBarManagerRef, OnlineMMOPlayer mmoPlayer, PrimarySkillType primarySkillType)
|
||||||
{
|
{
|
||||||
this.MMOExperienceBarManagerRef = MMOExperienceBarManagerRef;
|
this.MMOExperienceBarManagerRef = MMOExperienceBarManagerRef;
|
||||||
this.mmoPlayer = mmoPlayer;
|
this.mmoPlayer = mmoPlayer;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.gmail.nossr50.runnables.skills;
|
package com.gmail.nossr50.runnables.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.util.player.NotificationManager;
|
import com.gmail.nossr50.util.player.NotificationManager;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
|
|
||||||
public class SkillUnlockNotificationTask extends BukkitRunnable {
|
public class SkillUnlockNotificationTask extends BukkitRunnable {
|
||||||
private final McMMOPlayer mmoPlayer;
|
private final OnlineMMOPlayer mmoPlayer;
|
||||||
private final SubSkillType subSkillType;
|
private final SubSkillType subSkillType;
|
||||||
private final int rank;
|
private final int rank;
|
||||||
/**
|
/**
|
||||||
@ -16,7 +16,7 @@ public class SkillUnlockNotificationTask extends BukkitRunnable {
|
|||||||
* @param subSkillType the subskill that they just unlocked
|
* @param subSkillType the subskill that they just unlocked
|
||||||
* @param rank the rank of the subskill
|
* @param rank the rank of the subskill
|
||||||
*/
|
*/
|
||||||
public SkillUnlockNotificationTask(McMMOPlayer mmoPlayer, SubSkillType subSkillType, int rank)
|
public SkillUnlockNotificationTask(OnlineMMOPlayer mmoPlayer, SubSkillType subSkillType, int rank)
|
||||||
{
|
{
|
||||||
this.mmoPlayer = mmoPlayer;
|
this.mmoPlayer = mmoPlayer;
|
||||||
this.subSkillType = subSkillType;
|
this.subSkillType = subSkillType;
|
||||||
|
@ -2,16 +2,16 @@ package com.gmail.nossr50.runnables.skills;
|
|||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.AbilityToolType;
|
import com.gmail.nossr50.datatypes.skills.AbilityToolType;
|
||||||
import com.gmail.nossr50.util.player.NotificationManager;
|
import com.gmail.nossr50.util.player.NotificationManager;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
public class ToolLowerTask extends BukkitRunnable {
|
public class ToolLowerTask extends BukkitRunnable {
|
||||||
private final McMMOPlayer mmoPlayer;
|
private final OnlineMMOPlayer mmoPlayer;
|
||||||
private final AbilityToolType tool;
|
private final AbilityToolType tool;
|
||||||
|
|
||||||
public ToolLowerTask(McMMOPlayer mmoPlayer, AbilityToolType abilityToolType) {
|
public ToolLowerTask(OnlineMMOPlayer mmoPlayer, AbilityToolType abilityToolType) {
|
||||||
this.mmoPlayer = mmoPlayer;
|
this.mmoPlayer = mmoPlayer;
|
||||||
this.tool = abilityToolType;
|
this.tool = abilityToolType;
|
||||||
}
|
}
|
||||||
|
@ -2,17 +2,17 @@ package com.gmail.nossr50.skills;
|
|||||||
|
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public abstract class SkillManager {
|
public abstract class SkillManager {
|
||||||
protected McMMOPlayer mmoPlayer;
|
protected OnlineMMOPlayer mmoPlayer;
|
||||||
protected PrimarySkillType skill;
|
protected PrimarySkillType skill;
|
||||||
|
|
||||||
public SkillManager(McMMOPlayer mmoPlayer, PrimarySkillType skill) {
|
public SkillManager(OnlineMMOPlayer mmoPlayer, PrimarySkillType skill) {
|
||||||
this.mmoPlayer = mmoPlayer;
|
this.mmoPlayer = mmoPlayer;
|
||||||
this.skill = skill;
|
this.skill = skill;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import com.gmail.nossr50.config.experience.ExperienceConfig;
|
|||||||
import com.gmail.nossr50.datatypes.LimitedSizeList;
|
import com.gmail.nossr50.datatypes.LimitedSizeList;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@ -26,7 +26,7 @@ import org.bukkit.metadata.MetadataValue;
|
|||||||
|
|
||||||
public class AcrobaticsManager extends SkillManager {
|
public class AcrobaticsManager extends SkillManager {
|
||||||
|
|
||||||
public AcrobaticsManager(McMMOPlayer mmoPlayer) {
|
public AcrobaticsManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.ACROBATICS);
|
super(mmoPlayer, PrimarySkillType.ACROBATICS);
|
||||||
fallLocationMap = new LimitedSizeList(50);
|
fallLocationMap = new LimitedSizeList(50);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import com.gmail.nossr50.config.experience.ExperienceConfig;
|
|||||||
import com.gmail.nossr50.config.skills.alchemy.PotionConfig;
|
import com.gmail.nossr50.config.skills.alchemy.PotionConfig;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.alchemy.PotionStage;
|
import com.gmail.nossr50.datatypes.skills.alchemy.PotionStage;
|
||||||
@ -18,7 +18,7 @@ import java.util.List;
|
|||||||
public class AlchemyManager extends SkillManager {
|
public class AlchemyManager extends SkillManager {
|
||||||
private final double LUCKY_MODIFIER = 4.0 / 3.0;
|
private final double LUCKY_MODIFIER = 4.0 / 3.0;
|
||||||
|
|
||||||
public AlchemyManager(McMMOPlayer mmoPlayer) {
|
public AlchemyManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.ALCHEMY);
|
super(mmoPlayer, PrimarySkillType.ALCHEMY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.skills.archery;
|
|||||||
import com.gmail.nossr50.api.ItemSpawnReason;
|
import com.gmail.nossr50.api.ItemSpawnReason;
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.skills.RankUtils;
|
import com.gmail.nossr50.util.skills.RankUtils;
|
||||||
@ -65,13 +65,13 @@ public class Archery {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static double getSkillShotBonusDamage(@NotNull McMMOPlayer mmoPlayer, double oldDamage) {
|
public static double getSkillShotBonusDamage(@NotNull OnlineMMOPlayer mmoPlayer, double oldDamage) {
|
||||||
double damageBonusPercent = getDamageBonusPercent(mmoPlayer);
|
double damageBonusPercent = getDamageBonusPercent(mmoPlayer);
|
||||||
double newDamage = oldDamage + (oldDamage * damageBonusPercent);
|
double newDamage = oldDamage + (oldDamage * damageBonusPercent);
|
||||||
return Math.min(newDamage, (oldDamage + Archery.skillShotMaxBonusDamage));
|
return Math.min(newDamage, (oldDamage + Archery.skillShotMaxBonusDamage));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static double getDamageBonusPercent(@NotNull McMMOPlayer mmoPlayer) {
|
public static double getDamageBonusPercent(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
return ((RankUtils.getRank(mmoPlayer, SubSkillType.ARCHERY_SKILL_SHOT)) * (AdvancedConfig.getInstance().getSkillShotRankDamageMultiplier()) / 100.0D);
|
return ((RankUtils.getRank(mmoPlayer, SubSkillType.ARCHERY_SKILL_SHOT)) * (AdvancedConfig.getInstance().getSkillShotRankDamageMultiplier()) / 100.0D);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.skills.archery;
|
package com.gmail.nossr50.skills.archery;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@ -22,7 +22,7 @@ import org.bukkit.potion.PotionEffectType;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class ArcheryManager extends SkillManager {
|
public class ArcheryManager extends SkillManager {
|
||||||
public ArcheryManager(McMMOPlayer mmoPlayer) {
|
public ArcheryManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.ARCHERY);
|
super(mmoPlayer, PrimarySkillType.ARCHERY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.skills.axes;
|
|||||||
|
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.AbilityToolType;
|
import com.gmail.nossr50.datatypes.skills.AbilityToolType;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
@ -21,7 +21,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class AxesManager extends SkillManager {
|
public class AxesManager extends SkillManager {
|
||||||
public AxesManager(McMMOPlayer mmoPlayer) {
|
public AxesManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.AXES);
|
super(mmoPlayer, PrimarySkillType.AXES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.gmail.nossr50.skills.crossbows;
|
package com.gmail.nossr50.skills.crossbows;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@ -19,7 +19,7 @@ import org.bukkit.util.Vector;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class CrossbowManager extends SkillManager {
|
public class CrossbowManager extends SkillManager {
|
||||||
public CrossbowManager(McMMOPlayer mmoPlayer) {
|
public CrossbowManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.CROSSBOWS);
|
super(mmoPlayer, PrimarySkillType.CROSSBOWS);
|
||||||
}
|
}
|
||||||
private static final int SPREAD_VALUE = 12;
|
private static final int SPREAD_VALUE = 12;
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.skills.excavation;
|
|||||||
import com.gmail.nossr50.api.ItemSpawnReason;
|
import com.gmail.nossr50.api.ItemSpawnReason;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.datatypes.treasure.ExcavationTreasure;
|
import com.gmail.nossr50.datatypes.treasure.ExcavationTreasure;
|
||||||
@ -20,7 +20,7 @@ import org.bukkit.entity.Player;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ExcavationManager extends SkillManager {
|
public class ExcavationManager extends SkillManager {
|
||||||
public ExcavationManager(McMMOPlayer mmoPlayer) {
|
public ExcavationManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.EXCAVATION);
|
super(mmoPlayer, PrimarySkillType.EXCAVATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import com.gmail.nossr50.config.experience.ExperienceConfig;
|
|||||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.datatypes.treasure.EnchantmentTreasure;
|
import com.gmail.nossr50.datatypes.treasure.EnchantmentTreasure;
|
||||||
@ -62,7 +62,7 @@ public class FishingManager extends SkillManager {
|
|||||||
private Location hookLocation;
|
private Location hookLocation;
|
||||||
private int fishCaughtCounter = 1;
|
private int fishCaughtCounter = 1;
|
||||||
|
|
||||||
public FishingManager(McMMOPlayer mmoPlayer) {
|
public FishingManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.FISHING);
|
super(mmoPlayer, PrimarySkillType.FISHING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
|||||||
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.meta.RecentlyReplantedCropMeta;
|
import com.gmail.nossr50.datatypes.meta.RecentlyReplantedCropMeta;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.AbilityToolType;
|
import com.gmail.nossr50.datatypes.skills.AbilityToolType;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
@ -47,7 +47,7 @@ import java.util.HashSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class HerbalismManager extends SkillManager {
|
public class HerbalismManager extends SkillManager {
|
||||||
public HerbalismManager(McMMOPlayer mmoPlayer) {
|
public HerbalismManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.HERBALISM);
|
super(mmoPlayer, PrimarySkillType.HERBALISM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import com.gmail.nossr50.config.Config;
|
|||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||||
@ -33,7 +33,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class MiningManager extends SkillManager {
|
public class MiningManager extends SkillManager {
|
||||||
public MiningManager(McMMOPlayer mmoPlayer) {
|
public MiningManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.MINING);
|
super(mmoPlayer, PrimarySkillType.MINING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import com.gmail.nossr50.config.Config;
|
|||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -37,7 +37,7 @@ public class RepairManager extends SkillManager {
|
|||||||
private boolean placedAnvil;
|
private boolean placedAnvil;
|
||||||
private int lastClick;
|
private int lastClick;
|
||||||
|
|
||||||
public RepairManager(McMMOPlayer mmoPlayer) {
|
public RepairManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.REPAIR);
|
super(mmoPlayer, PrimarySkillType.REPAIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
|||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -39,7 +39,7 @@ public class SalvageManager extends SkillManager {
|
|||||||
private boolean placedAnvil;
|
private boolean placedAnvil;
|
||||||
private int lastClick;
|
private int lastClick;
|
||||||
|
|
||||||
public SalvageManager(McMMOPlayer mmoPlayer) {
|
public SalvageManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.SALVAGE);
|
super(mmoPlayer, PrimarySkillType.SALVAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.skills.smelting;
|
|||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.skills.SkillManager;
|
import com.gmail.nossr50.skills.SkillManager;
|
||||||
@ -15,7 +15,7 @@ import org.bukkit.event.inventory.FurnaceBurnEvent;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class SmeltingManager extends SkillManager {
|
public class SmeltingManager extends SkillManager {
|
||||||
public SmeltingManager(McMMOPlayer mmoPlayer) {
|
public SmeltingManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.SMELTING);
|
super(mmoPlayer, PrimarySkillType.SMELTING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.skills.swords;
|
package com.gmail.nossr50.skills.swords;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.AbilityToolType;
|
import com.gmail.nossr50.datatypes.skills.AbilityToolType;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
@ -25,7 +25,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class SwordsManager extends SkillManager {
|
public class SwordsManager extends SkillManager {
|
||||||
public SwordsManager(McMMOPlayer mmoPlayer) {
|
public SwordsManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.SWORDS);
|
super(mmoPlayer, PrimarySkillType.SWORDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import com.gmail.nossr50.config.Config;
|
|||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.subskills.taming.CallOfTheWildType;
|
import com.gmail.nossr50.datatypes.skills.subskills.taming.CallOfTheWildType;
|
||||||
@ -45,7 +45,7 @@ public class TamingManager extends SkillManager {
|
|||||||
|
|
||||||
private HashMap<CallOfTheWildType, List<TrackedTamingEntity>> playerSummonedEntities;
|
private HashMap<CallOfTheWildType, List<TrackedTamingEntity>> playerSummonedEntities;
|
||||||
|
|
||||||
public TamingManager(@NotNull McMMOPlayer mmoPlayer) {
|
public TamingManager(@NotNull OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.TAMING);
|
super(mmoPlayer, PrimarySkillType.TAMING);
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.gmail.nossr50.skills.tridents;
|
package com.gmail.nossr50.skills.tridents;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.skills.SkillManager;
|
import com.gmail.nossr50.skills.SkillManager;
|
||||||
|
|
||||||
public class TridentManager extends SkillManager {
|
public class TridentManager extends SkillManager {
|
||||||
public TridentManager(McMMOPlayer mmoPlayer) {
|
public TridentManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.TRIDENTS);
|
super(mmoPlayer, PrimarySkillType.TRIDENTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.skills.unarmed;
|
|||||||
import com.gmail.nossr50.api.ItemSpawnReason;
|
import com.gmail.nossr50.api.ItemSpawnReason;
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.AbilityToolType;
|
import com.gmail.nossr50.datatypes.skills.AbilityToolType;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
@ -27,7 +27,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
|
|
||||||
public class UnarmedManager extends SkillManager {
|
public class UnarmedManager extends SkillManager {
|
||||||
|
|
||||||
public UnarmedManager(McMMOPlayer mmoPlayer) {
|
public UnarmedManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.UNARMED);
|
super(mmoPlayer, PrimarySkillType.UNARMED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import com.gmail.nossr50.config.Config;
|
|||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||||
@ -51,7 +51,7 @@ public class WoodcuttingManager extends SkillManager {
|
|||||||
new int[] { 2, -1}, new int[] { 2, 0}, new int[] { 2, 1},
|
new int[] { 2, -1}, new int[] { 2, 0}, new int[] { 2, 1},
|
||||||
};
|
};
|
||||||
|
|
||||||
public WoodcuttingManager(McMMOPlayer mmoPlayer) {
|
public WoodcuttingManager(OnlineMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.WOODCUTTING);
|
super(mmoPlayer, PrimarySkillType.WOODCUTTING);
|
||||||
treeFellerThreshold = Config.getInstance().getTreeFellerThreshold();
|
treeFellerThreshold = Config.getInstance().getTreeFellerThreshold();
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.util;
|
|||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.runnables.items.ChimaeraWingWarmup;
|
import com.gmail.nossr50.runnables.items.ChimaeraWingWarmup;
|
||||||
@ -25,7 +25,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public final class ChimaeraWing {
|
public final class ChimaeraWing {
|
||||||
private static McMMOPlayer mmoPlayer;
|
private static OnlineMMOPlayer mmoPlayer;
|
||||||
private static Location location;
|
private static Location location;
|
||||||
|
|
||||||
private ChimaeraWing() {}
|
private ChimaeraWing() {}
|
||||||
|
@ -4,7 +4,7 @@ import com.gmail.nossr50.config.Config;
|
|||||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
import com.gmail.nossr50.datatypes.experience.XPGainSource;
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
@ -92,9 +92,9 @@ public final class EventUtils {
|
|||||||
* This little method is just to make the code more readable
|
* This little method is just to make the code more readable
|
||||||
*
|
*
|
||||||
* @param entity target entity
|
* @param entity target entity
|
||||||
* @return the associated McMMOPlayer for this entity
|
* @return the associated OnlineMMOPlayer for this entity
|
||||||
*/
|
*/
|
||||||
public static McMMOPlayer getMcMMOPlayer(@NotNull Entity entity)
|
public static OnlineMMOPlayer getMcMMOPlayer(@NotNull Entity entity)
|
||||||
{
|
{
|
||||||
return mcMMO.getUserManager().queryPlayer((Player)entity);
|
return mcMMO.getUserManager().queryPlayer((Player)entity);
|
||||||
}
|
}
|
||||||
@ -144,7 +144,7 @@ public final class EventUtils {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
||||||
|
|
||||||
if(mmoPlayer == null)
|
if(mmoPlayer == null)
|
||||||
{
|
{
|
||||||
@ -273,7 +273,7 @@ public final class EventUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void handlePartyTeleportEvent(Player teleportingPlayer, Player targetPlayer) {
|
public static void handlePartyTeleportEvent(Player teleportingPlayer, Player targetPlayer) {
|
||||||
McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(teleportingPlayer);
|
OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(teleportingPlayer);
|
||||||
|
|
||||||
if(mmoPlayer == null)
|
if(mmoPlayer == null)
|
||||||
return;
|
return;
|
||||||
@ -386,7 +386,7 @@ public final class EventUtils {
|
|||||||
HashMap<String, Integer> levelChangedVictim = eventVictim.getLevelChanged();
|
HashMap<String, Integer> levelChangedVictim = eventVictim.getLevelChanged();
|
||||||
HashMap<String, Float> experienceChangedVictim = eventVictim.getExperienceChanged();
|
HashMap<String, Float> experienceChangedVictim = eventVictim.getExperienceChanged();
|
||||||
|
|
||||||
McMMOPlayer killerPlayer = mcMMO.getUserManager().queryPlayer(killer);
|
OnlineMMOPlayer killerPlayer = mcMMO.getUserManager().queryPlayer(killer);
|
||||||
|
|
||||||
//Not loaded
|
//Not loaded
|
||||||
if(killerPlayer == null)
|
if(killerPlayer == null)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user