mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-19 00:45:27 +01:00
Changing the style of our code
This commit is contained in:
parent
e749d5eb7f
commit
bbcc1ee7da
@ -1,11 +1,11 @@
|
|||||||
package com.gmail.nossr50.commands;
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.data.database.FlatfileDatabaseManager;
|
import com.gmail.nossr50.core.data.database.FlatfileDatabaseManager;
|
||||||
import com.gmail.nossr50.core.data.database.SQLDatabaseManager;
|
import com.gmail.nossr50.core.data.database.SQLDatabaseManager;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.gmail.nossr50.commands;
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.skills.ModConfigType;
|
import com.gmail.nossr50.core.skills.ModConfigType;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.util.Misc;
|
import com.gmail.nossr50.core.util.Misc;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
@ -71,17 +71,14 @@ public class McImportCommand implements CommandExecutor {
|
|||||||
materialNames.get(type).add(materialName);
|
materialNames.get(type).add(materialName);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
} catch (FileNotFoundException e) {
|
||||||
catch (FileNotFoundException e) {
|
|
||||||
mcMMO.p.getLogger().warning("Could not find " + importFile.getAbsolutePath() + " ! (No such file or directory)");
|
mcMMO.p.getLogger().warning("Could not find " + importFile.getAbsolutePath() + " ! (No such file or directory)");
|
||||||
mcMMO.p.getLogger().warning("Copy and paste latest.log to " + importFile.getParentFile().getAbsolutePath() + " and rename it to import.log");
|
mcMMO.p.getLogger().warning("Copy and paste latest.log to " + importFile.getParentFile().getAbsolutePath() + " and rename it to import.log");
|
||||||
return false;
|
return false;
|
||||||
}
|
} catch (Exception e) {
|
||||||
catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return false;
|
return false;
|
||||||
}
|
} finally {
|
||||||
finally {
|
|
||||||
tryClose(in);
|
tryClose(in);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,8 +113,7 @@ public class McImportCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
c.close();
|
c.close();
|
||||||
}
|
} catch (IOException e) {
|
||||||
catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -169,16 +165,13 @@ public class McImportCommand implements CommandExecutor {
|
|||||||
|
|
||||||
out = new FileWriter(outputFile);
|
out = new FileWriter(outputFile);
|
||||||
out.write(writer.toString());
|
out.write(writer.toString());
|
||||||
}
|
} catch (IOException e) {
|
||||||
catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return;
|
return;
|
||||||
}
|
} catch (Exception e) {
|
||||||
catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return;
|
return;
|
||||||
}
|
} finally {
|
||||||
finally {
|
|
||||||
tryClose(out);
|
tryClose(out);
|
||||||
fileAmount++;
|
fileAmount++;
|
||||||
}
|
}
|
||||||
@ -208,14 +201,11 @@ public class McImportCommand implements CommandExecutor {
|
|||||||
String skillName = "UNIDENTIFIED";
|
String skillName = "UNIDENTIFIED";
|
||||||
if (materialName.contains("ORE")) {
|
if (materialName.contains("ORE")) {
|
||||||
skillName = "Mining";
|
skillName = "Mining";
|
||||||
}
|
} else if (materialName.contains("LOG") || materialName.contains("LEAVES")) {
|
||||||
else if (materialName.contains("LOG") || materialName.contains("LEAVES")) {
|
|
||||||
skillName = "Woodcutting";
|
skillName = "Woodcutting";
|
||||||
}
|
} else if (materialName.contains("GRASS") || materialName.contains("FLOWER") || materialName.contains("CROP")) {
|
||||||
else if (materialName.contains("GRASS") || materialName.contains("FLOWER") || materialName.contains("CROP")) {
|
|
||||||
skillName = "Herbalism";
|
skillName = "Herbalism";
|
||||||
}
|
} else if (materialName.contains("DIRT") || materialName.contains("SAND")) {
|
||||||
else if (materialName.contains("DIRT") || materialName.contains("SAND")) {
|
|
||||||
skillName = "Excavation";
|
skillName = "Excavation";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,8 +220,7 @@ public class McImportCommand implements CommandExecutor {
|
|||||||
|
|
||||||
if (skillName.equals("Mining")) {
|
if (skillName.equals("Mining")) {
|
||||||
skillContents.add(" " + " " + "Smelting_XP_Gain: 9");
|
skillContents.add(" " + " " + "Smelting_XP_Gain: 9");
|
||||||
}
|
} else if (skillName.equals("Woodcutting")) {
|
||||||
else if (skillName.equals("Woodcutting")) {
|
|
||||||
skillContents.add(" " + " " + "Is_Log: " + materialName.contains("LOG"));
|
skillContents.add(" " + " " + "Is_Log: " + materialName.contains("LOG"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -247,20 +236,15 @@ public class McImportCommand implements CommandExecutor {
|
|||||||
String toolType = "UNIDENTIFIED";
|
String toolType = "UNIDENTIFIED";
|
||||||
if (materialName.contains("PICKAXE")) {
|
if (materialName.contains("PICKAXE")) {
|
||||||
toolType = "Pickaxes";
|
toolType = "Pickaxes";
|
||||||
}
|
} else if (materialName.contains("AXE")) {
|
||||||
else if (materialName.contains("AXE")) {
|
|
||||||
toolType = "Axes";
|
toolType = "Axes";
|
||||||
}
|
} else if (materialName.contains("BOW")) {
|
||||||
else if (materialName.contains("BOW")) {
|
|
||||||
toolType = "Bows";
|
toolType = "Bows";
|
||||||
}
|
} else if (materialName.contains("HOE")) {
|
||||||
else if (materialName.contains("HOE")) {
|
|
||||||
toolType = "Hoes";
|
toolType = "Hoes";
|
||||||
}
|
} else if (materialName.contains("SHOVEL") || materialName.contains("SPADE")) {
|
||||||
else if (materialName.contains("SHOVEL") || materialName.contains("SPADE")) {
|
|
||||||
toolType = "Shovels";
|
toolType = "Shovels";
|
||||||
}
|
} else if (materialName.contains("SWORD")) {
|
||||||
else if (materialName.contains("SWORD")) {
|
|
||||||
toolType = "Swords";
|
toolType = "Swords";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,14 +271,11 @@ public class McImportCommand implements CommandExecutor {
|
|||||||
String toolType = "UNIDENTIFIED";
|
String toolType = "UNIDENTIFIED";
|
||||||
if (materialName.contains("BOOT") || materialName.contains("SHOE")) {
|
if (materialName.contains("BOOT") || materialName.contains("SHOE")) {
|
||||||
toolType = "Boots";
|
toolType = "Boots";
|
||||||
}
|
} else if (materialName.contains("CHESTPLATE") || materialName.contains("CHEST")) {
|
||||||
else if (materialName.contains("CHESTPLATE") || materialName.contains("CHEST")) {
|
|
||||||
toolType = "Chestplates";
|
toolType = "Chestplates";
|
||||||
}
|
} else if (materialName.contains("HELM") || materialName.contains("HAT")) {
|
||||||
else if (materialName.contains("HELM") || materialName.contains("HAT")) {
|
|
||||||
toolType = "Helmets";
|
toolType = "Helmets";
|
||||||
}
|
} else if (materialName.contains("LEGGINGS") || materialName.contains("LEGS") || materialName.contains("PANTS")) {
|
||||||
else if (materialName.contains("LEGGINGS") || materialName.contains("LEGS") || materialName.contains("PANTS")) {
|
|
||||||
toolType = "Leggings";
|
toolType = "Leggings";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,9 +22,6 @@ public class McconvertCommand implements TabExecutor {
|
|||||||
private static final List<String> DATABASE_TYPES;
|
private static final List<String> DATABASE_TYPES;
|
||||||
private static final List<String> SUBCOMMANDS = ImmutableList.of("database", "experience");
|
private static final List<String> SUBCOMMANDS = ImmutableList.of("database", "experience");
|
||||||
|
|
||||||
private CommandExecutor databaseConvertCommand = new ConvertDatabaseCommand();
|
|
||||||
private CommandExecutor experienceConvertCommand = new ConvertExperienceCommand();
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
ArrayList<String> formulaTypes = new ArrayList<String>();
|
ArrayList<String> formulaTypes = new ArrayList<String>();
|
||||||
ArrayList<String> databaseTypes = new ArrayList<String>();
|
ArrayList<String> databaseTypes = new ArrayList<String>();
|
||||||
@ -52,14 +49,16 @@ public class McconvertCommand implements TabExecutor {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private CommandExecutor databaseConvertCommand = new ConvertDatabaseCommand();
|
||||||
|
private CommandExecutor experienceConvertCommand = new ConvertExperienceCommand();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 2:
|
case 2:
|
||||||
if (args[0].equalsIgnoreCase("database") || args[0].equalsIgnoreCase("db")) {
|
if (args[0].equalsIgnoreCase("database") || args[0].equalsIgnoreCase("db")) {
|
||||||
return databaseConvertCommand.onCommand(sender, command, label, args);
|
return databaseConvertCommand.onCommand(sender, command, label, args);
|
||||||
}
|
} else if (args[0].equalsIgnoreCase("experience") || args[0].equalsIgnoreCase("xp") || args[1].equalsIgnoreCase("exp")) {
|
||||||
else if (args[0].equalsIgnoreCase("experience") || args[0].equalsIgnoreCase("xp") || args[1].equalsIgnoreCase("exp")) {
|
|
||||||
return experienceConvertCommand.onCommand(sender, command, label, args);
|
return experienceConvertCommand.onCommand(sender, command, label, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ package com.gmail.nossr50.commands;
|
|||||||
import com.gmail.nossr50.commands.party.PartySubcommandType;
|
import com.gmail.nossr50.commands.party.PartySubcommandType;
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.gmail.nossr50.commands;
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.gmail.nossr50.commands;
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -71,7 +71,10 @@ public abstract class ToggleCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected abstract boolean hasOtherPermission(CommandSender sender);
|
protected abstract boolean hasOtherPermission(CommandSender sender);
|
||||||
|
|
||||||
protected abstract boolean hasSelfPermission(CommandSender sender);
|
protected abstract boolean hasSelfPermission(CommandSender sender);
|
||||||
|
|
||||||
protected abstract void applyCommandAction(McMMOPlayer mcMMOPlayer);
|
protected abstract void applyCommandAction(McMMOPlayer mcMMOPlayer);
|
||||||
|
|
||||||
protected abstract void sendSuccessMessage(CommandSender sender, String playerName);
|
protected abstract void sendSuccessMessage(CommandSender sender, String playerName);
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.gmail.nossr50.commands;
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.AdvancedConfig;
|
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
|
import com.gmail.nossr50.core.config.skills.AdvancedConfig;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.StringUtils;
|
import com.gmail.nossr50.core.util.StringUtils;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.util.player.NotificationManager;
|
import com.gmail.nossr50.core.util.player.NotificationManager;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -36,8 +36,7 @@ public class XprateCommand implements TabExecutor {
|
|||||||
|
|
||||||
if (mcMMO.p.isXPEventEnabled()) {
|
if (mcMMO.p.isXPEventEnabled()) {
|
||||||
|
|
||||||
if(AdvancedConfig.getInstance().useTitlesForXPEvent())
|
if (AdvancedConfig.getInstance().useTitlesForXPEvent()) {
|
||||||
{
|
|
||||||
NotificationManager.broadcastTitle(mcMMO.p.getServer(),
|
NotificationManager.broadcastTitle(mcMMO.p.getServer(),
|
||||||
LocaleLoader.getString("Commands.Event.Stop"),
|
LocaleLoader.getString("Commands.Event.Stop"),
|
||||||
LocaleLoader.getString("Commands.Event.Stop.Subtitle"),
|
LocaleLoader.getString("Commands.Event.Stop.Subtitle"),
|
||||||
@ -65,18 +64,15 @@ public class XprateCommand implements TabExecutor {
|
|||||||
|
|
||||||
if (CommandUtils.shouldDisableToggle(args[1])) {
|
if (CommandUtils.shouldDisableToggle(args[1])) {
|
||||||
mcMMO.p.setXPEventEnabled(false);
|
mcMMO.p.setXPEventEnabled(false);
|
||||||
}
|
} else if (CommandUtils.shouldEnableToggle(args[1])) {
|
||||||
else if (CommandUtils.shouldEnableToggle(args[1])) {
|
|
||||||
mcMMO.p.setXPEventEnabled(true);
|
mcMMO.p.setXPEventEnabled(true);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int newXpRate = Integer.parseInt(args[0]);
|
int newXpRate = Integer.parseInt(args[0]);
|
||||||
|
|
||||||
if(newXpRate < 0)
|
if (newXpRate < 0) {
|
||||||
{
|
|
||||||
sender.sendMessage(ChatColor.RED + LocaleLoader.getString("Commands.NegativeNumberWarn"));
|
sender.sendMessage(ChatColor.RED + LocaleLoader.getString("Commands.NegativeNumberWarn"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -84,8 +80,7 @@ public class XprateCommand implements TabExecutor {
|
|||||||
ExperienceConfig.getInstance().setExperienceGainsGlobalMultiplier(newXpRate);
|
ExperienceConfig.getInstance().setExperienceGainsGlobalMultiplier(newXpRate);
|
||||||
|
|
||||||
if (mcMMO.p.isXPEventEnabled()) {
|
if (mcMMO.p.isXPEventEnabled()) {
|
||||||
if(AdvancedConfig.getInstance().useTitlesForXPEvent())
|
if (AdvancedConfig.getInstance().useTitlesForXPEvent()) {
|
||||||
{
|
|
||||||
NotificationManager.broadcastTitle(mcMMO.p.getServer(),
|
NotificationManager.broadcastTitle(mcMMO.p.getServer(),
|
||||||
LocaleLoader.getString("Commands.Event.Start"),
|
LocaleLoader.getString("Commands.Event.Start"),
|
||||||
LocaleLoader.getString("Commands.Event.XP", newXpRate),
|
LocaleLoader.getString("Commands.Event.XP", newXpRate),
|
||||||
@ -93,8 +88,7 @@ public class XprateCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.Event.Start"));
|
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.Event.Start"));
|
||||||
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.Event.XP", newXpRate));
|
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.Event.XP", newXpRate));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.xprate.modified", newXpRate));
|
sender.sendMessage(LocaleLoader.getString("Commands.xprate.modified", newXpRate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,13 +3,13 @@ package com.gmail.nossr50.commands.chat;
|
|||||||
import com.gmail.nossr50.core.chat.ChatManager;
|
import com.gmail.nossr50.core.chat.ChatManager;
|
||||||
import com.gmail.nossr50.core.chat.ChatManagerFactory;
|
import com.gmail.nossr50.core.chat.ChatManagerFactory;
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.chat.ChatMode;
|
import com.gmail.nossr50.core.datatypes.chat.ChatMode;
|
||||||
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
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;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -21,8 +21,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public abstract class ChatCommand implements TabExecutor {
|
public abstract class ChatCommand implements TabExecutor {
|
||||||
private ChatMode chatMode;
|
|
||||||
protected ChatManager chatManager;
|
protected ChatManager chatManager;
|
||||||
|
private ChatMode chatMode;
|
||||||
|
|
||||||
public ChatCommand(ChatMode chatMode) {
|
public ChatCommand(ChatMode chatMode) {
|
||||||
this.chatMode = chatMode;
|
this.chatMode = chatMode;
|
||||||
@ -47,8 +47,7 @@ public abstract class ChatCommand implements TabExecutor {
|
|||||||
|
|
||||||
if (mcMMOPlayer.isChatEnabled(chatMode)) {
|
if (mcMMOPlayer.isChatEnabled(chatMode)) {
|
||||||
disableChatMode(mcMMOPlayer, sender);
|
disableChatMode(mcMMOPlayer, sender);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
enableChatMode(mcMMOPlayer, sender);
|
enableChatMode(mcMMOPlayer, sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,12 +2,12 @@ package com.gmail.nossr50.commands.chat;
|
|||||||
|
|
||||||
import com.gmail.nossr50.core.chat.PartyChatManager;
|
import com.gmail.nossr50.core.chat.PartyChatManager;
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.chat.ChatMode;
|
import com.gmail.nossr50.core.datatypes.chat.ChatMode;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@ -35,8 +35,7 @@ public class PartyChatCommand extends ChatCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message = buildChatMessage(args, 0);
|
message = buildChatMessage(args, 0);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (args.length < 2) {
|
if (args.length < 2) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Party.Specify"));
|
sender.sendMessage(LocaleLoader.getString("Party.Specify"));
|
||||||
return;
|
return;
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
package com.gmail.nossr50.commands.database;
|
package com.gmail.nossr50.commands.database;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.data.database.DatabaseManager;
|
import com.gmail.nossr50.core.data.database.DatabaseManager;
|
||||||
import com.gmail.nossr50.core.data.database.DatabaseManagerFactory;
|
import com.gmail.nossr50.core.data.database.DatabaseManagerFactory;
|
||||||
import com.gmail.nossr50.core.datatypes.database.DatabaseType;
|
import com.gmail.nossr50.core.datatypes.database.DatabaseType;
|
||||||
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.runnables.database.DatabaseConversionTask;
|
import com.gmail.nossr50.core.runnables.database.DatabaseConversionTask;
|
||||||
import com.gmail.nossr50.core.runnables.player.PlayerProfileLoadingTask;
|
import com.gmail.nossr50.core.runnables.player.PlayerProfileLoadingTask;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -41,8 +41,7 @@ public class ConvertDatabaseCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
oldDatabase = DatabaseManagerFactory.createCustomDatabaseManager((Class<? extends DatabaseManager>) clazz);
|
oldDatabase = DatabaseManagerFactory.createCustomDatabaseManager((Class<? extends DatabaseManager>) clazz);
|
||||||
}
|
} catch (Throwable e) {
|
||||||
catch (Throwable e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.mcconvert.Database.InvalidType", args[1]));
|
sender.sendMessage(LocaleLoader.getString("Commands.mcconvert.Database.InvalidType", args[1]));
|
||||||
return true;
|
return true;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.gmail.nossr50.commands.database;
|
package com.gmail.nossr50.commands.database;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
|
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;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -26,8 +26,7 @@ public class McremoveCommand implements TabExecutor {
|
|||||||
|
|
||||||
if (mcMMO.getDatabaseManager().removeUser(playerName)) {
|
if (mcMMO.getDatabaseManager().removeUser(playerName)) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.mcremove.Success", playerName));
|
sender.sendMessage(LocaleLoader.getString("Commands.mcremove.Success", playerName));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
sender.sendMessage(playerName + " could not be removed from the database."); // Pretty sure this should NEVER happen.
|
sender.sendMessage(playerName + " could not be removed from the database."); // Pretty sure this should NEVER happen.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@ package com.gmail.nossr50.commands.experience;
|
|||||||
|
|
||||||
import com.gmail.nossr50.core.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.core.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.util.EventUtils;
|
import com.gmail.nossr50.core.util.EventUtils;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.gmail.nossr50.commands.experience;
|
package com.gmail.nossr50.commands.experience;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.core.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.core.datatypes.experience.XPGainSource;
|
import com.gmail.nossr50.core.datatypes.experience.XPGainSource;
|
||||||
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@ -25,8 +25,7 @@ public class AddxpCommand extends ExperienceCommand {
|
|||||||
protected void handleCommand(Player player, PlayerProfile profile, PrimarySkillType skill, int value) {
|
protected void handleCommand(Player player, PlayerProfile profile, PrimarySkillType skill, int value) {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
UserManager.getPlayer(player).applyXpGain(skill, value, XPGainReason.COMMAND, XPGainSource.COMMAND);
|
UserManager.getPlayer(player).applyXpGain(skill, value, XPGainReason.COMMAND, XPGainSource.COMMAND);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
profile.addXp(skill, value);
|
profile.addXp(skill, value);
|
||||||
profile.scheduleAsyncSave();
|
profile.scheduleAsyncSave();
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.gmail.nossr50.commands.experience;
|
package com.gmail.nossr50.commands.experience;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.experience.FormulaType;
|
import com.gmail.nossr50.core.datatypes.experience.FormulaType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.runnables.database.FormulaConversionTask;
|
import com.gmail.nossr50.core.runnables.database.FormulaConversionTask;
|
||||||
import com.gmail.nossr50.core.runnables.player.PlayerProfileLoadingTask;
|
import com.gmail.nossr50.core.runnables.player.PlayerProfileLoadingTask;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.gmail.nossr50.commands.experience;
|
package com.gmail.nossr50.commands.experience;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -20,6 +20,14 @@ import java.util.List;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public abstract class ExperienceCommand implements TabExecutor {
|
public abstract class ExperienceCommand implements TabExecutor {
|
||||||
|
protected static void handleSenderMessage(CommandSender sender, String playerName, PrimarySkillType skill) {
|
||||||
|
if (skill == null) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", playerName));
|
||||||
|
} else {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", skill.getName(), playerName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
PrimarySkillType skill;
|
PrimarySkillType skill;
|
||||||
@ -45,8 +53,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
skill = null;
|
skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skill != null && skill.isChildSkill())
|
if (skill != null && skill.isChildSkill()) {
|
||||||
{
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Skill.ChildSkill"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Skill.ChildSkill"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -70,8 +77,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
skill = null;
|
skill = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skill != null && skill.isChildSkill())
|
if (skill != null && skill.isChildSkill()) {
|
||||||
{
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Skill.ChildSkill"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Skill.ChildSkill"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -95,8 +101,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
editValues(null, profile, skill, value);
|
editValues(null, profile, skill, value);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
editValues(mcMMOPlayer.getPlayer(), mcMMOPlayer.getProfile(), skill, value);
|
editValues(mcMMOPlayer.getPlayer(), mcMMOPlayer.getProfile(), skill, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,24 +127,19 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected abstract boolean permissionsCheckSelf(CommandSender sender);
|
protected abstract boolean permissionsCheckSelf(CommandSender sender);
|
||||||
|
|
||||||
protected abstract boolean permissionsCheckOthers(CommandSender sender);
|
protected abstract boolean permissionsCheckOthers(CommandSender sender);
|
||||||
|
|
||||||
protected abstract void handleCommand(Player player, PlayerProfile profile, PrimarySkillType skill, int value);
|
protected abstract void handleCommand(Player player, PlayerProfile profile, PrimarySkillType skill, int value);
|
||||||
|
|
||||||
protected abstract void handlePlayerMessageAll(Player player, int value);
|
protected abstract void handlePlayerMessageAll(Player player, int value);
|
||||||
|
|
||||||
protected abstract void handlePlayerMessageSkill(Player player, int value, PrimarySkillType skill);
|
protected abstract void handlePlayerMessageSkill(Player player, int value, PrimarySkillType skill);
|
||||||
|
|
||||||
private boolean validateArguments(CommandSender sender, String skillName, String value) {
|
private boolean validateArguments(CommandSender sender, String skillName, String value) {
|
||||||
return !(CommandUtils.isInvalidInteger(sender, value) || (!skillName.equalsIgnoreCase("all") && CommandUtils.isInvalidSkill(sender, skillName)));
|
return !(CommandUtils.isInvalidInteger(sender, value) || (!skillName.equalsIgnoreCase("all") && CommandUtils.isInvalidSkill(sender, skillName)));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void handleSenderMessage(CommandSender sender, String playerName, PrimarySkillType skill) {
|
|
||||||
if (skill == null) {
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", playerName));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", skill.getName(), playerName));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void editValues(Player player, PlayerProfile profile, PrimarySkillType skill, int value) {
|
protected void editValues(Player player, PlayerProfile profile, PrimarySkillType skill, int value) {
|
||||||
if (skill == null) {
|
if (skill == null) {
|
||||||
for (PrimarySkillType primarySkillType : PrimarySkillType.NON_CHILD_SKILLS) {
|
for (PrimarySkillType primarySkillType : PrimarySkillType.NON_CHILD_SKILLS) {
|
||||||
@ -149,8 +149,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
if (player != null) {
|
if (player != null) {
|
||||||
handlePlayerMessageAll(player, value);
|
handlePlayerMessageAll(player, value);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
handleCommand(player, profile, skill, value);
|
handleCommand(player, profile, skill, value);
|
||||||
|
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
|
@ -2,8 +2,8 @@ package com.gmail.nossr50.commands.experience;
|
|||||||
|
|
||||||
import com.gmail.nossr50.core.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.core.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.util.EventUtils;
|
import com.gmail.nossr50.core.util.EventUtils;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
package com.gmail.nossr50.commands.experience;
|
package com.gmail.nossr50.commands.experience;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.core.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.util.EventUtils;
|
import com.gmail.nossr50.core.util.EventUtils;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -27,6 +27,14 @@ import java.util.UUID;
|
|||||||
* value/quantity argument is removed.
|
* value/quantity argument is removed.
|
||||||
*/
|
*/
|
||||||
public class SkillresetCommand implements TabExecutor {
|
public class SkillresetCommand implements TabExecutor {
|
||||||
|
protected static void handleSenderMessage(CommandSender sender, String playerName, PrimarySkillType skill) {
|
||||||
|
if (skill == null) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", playerName));
|
||||||
|
} else {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", skill.getName(), playerName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
PrimarySkillType skill;
|
PrimarySkillType skill;
|
||||||
@ -47,8 +55,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
|
|
||||||
if (args[0].equalsIgnoreCase("all")) {
|
if (args[0].equalsIgnoreCase("all")) {
|
||||||
skill = null;
|
skill = null;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
skill = PrimarySkillType.getSkill(args[1]);
|
skill = PrimarySkillType.getSkill(args[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,8 +74,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
|
|
||||||
if (args[1].equalsIgnoreCase("all")) {
|
if (args[1].equalsIgnoreCase("all")) {
|
||||||
skill = null;
|
skill = null;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
skill = PrimarySkillType.getSkill(args[1]);
|
skill = PrimarySkillType.getSkill(args[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,8 +95,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
editValues(null, profile, skill);
|
editValues(null, profile, skill);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
editValues(mcMMOPlayer.getPlayer(), mcMMOPlayer.getProfile(), skill);
|
editValues(mcMMOPlayer.getPlayer(), mcMMOPlayer.getProfile(), skill);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,15 +154,6 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
return skillName.equalsIgnoreCase("all") || !CommandUtils.isInvalidSkill(sender, skillName);
|
return skillName.equalsIgnoreCase("all") || !CommandUtils.isInvalidSkill(sender, skillName);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void handleSenderMessage(CommandSender sender, String playerName, PrimarySkillType skill) {
|
|
||||||
if (skill == null) {
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", playerName));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", skill.getName(), playerName));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void editValues(Player player, PlayerProfile profile, PrimarySkillType skill) {
|
protected void editValues(Player player, PlayerProfile profile, PrimarySkillType skill) {
|
||||||
if (skill == null) {
|
if (skill == null) {
|
||||||
for (PrimarySkillType primarySkillType : PrimarySkillType.NON_CHILD_SKILLS) {
|
for (PrimarySkillType primarySkillType : PrimarySkillType.NON_CHILD_SKILLS) {
|
||||||
@ -167,8 +163,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
if (player != null) {
|
if (player != null) {
|
||||||
handlePlayerMessageAll(player);
|
handlePlayerMessageAll(player);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
handleCommand(player, profile, skill);
|
handleCommand(player, profile, skill);
|
||||||
|
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.gmail.nossr50.commands.hardcore;
|
package com.gmail.nossr50.commands.hardcore;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
public class HardcoreCommand extends HardcoreModeCommand {
|
public class HardcoreCommand extends HardcoreModeCommand {
|
||||||
@ -54,8 +54,7 @@ public class HardcoreCommand extends HardcoreModeCommand {
|
|||||||
for (PrimarySkillType primarySkillType : PrimarySkillType.NON_CHILD_SKILLS) {
|
for (PrimarySkillType primarySkillType : PrimarySkillType.NON_CHILD_SKILLS) {
|
||||||
primarySkillType.setHardcoreStatLossEnabled(enable);
|
primarySkillType.setHardcoreStatLossEnabled(enable);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
skill.setHardcoreStatLossEnabled(enable);
|
skill.setHardcoreStatLossEnabled(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,8 +28,7 @@ public abstract class HardcoreModeCommand implements TabExecutor {
|
|||||||
|
|
||||||
if (checkEnabled(null)) {
|
if (checkEnabled(null)) {
|
||||||
disable(null);
|
disable(null);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
enable(null);
|
enable(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,9 +121,14 @@ public abstract class HardcoreModeCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected abstract boolean checkTogglePermissions(CommandSender sender);
|
protected abstract boolean checkTogglePermissions(CommandSender sender);
|
||||||
|
|
||||||
protected abstract boolean checkModifyPermissions(CommandSender sender);
|
protected abstract boolean checkModifyPermissions(CommandSender sender);
|
||||||
|
|
||||||
protected abstract boolean checkEnabled(PrimarySkillType skill);
|
protected abstract boolean checkEnabled(PrimarySkillType skill);
|
||||||
|
|
||||||
protected abstract void enable(PrimarySkillType skill);
|
protected abstract void enable(PrimarySkillType skill);
|
||||||
|
|
||||||
protected abstract void disable(PrimarySkillType skill);
|
protected abstract void disable(PrimarySkillType skill);
|
||||||
|
|
||||||
protected abstract void modify(CommandSender sender, double newPercentage);
|
protected abstract void modify(CommandSender sender, double newPercentage);
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.gmail.nossr50.commands.hardcore;
|
package com.gmail.nossr50.commands.hardcore;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
public class VampirismCommand extends HardcoreModeCommand {
|
public class VampirismCommand extends HardcoreModeCommand {
|
||||||
@ -54,8 +54,7 @@ public class VampirismCommand extends HardcoreModeCommand {
|
|||||||
for (PrimarySkillType primarySkillType : PrimarySkillType.NON_CHILD_SKILLS) {
|
for (PrimarySkillType primarySkillType : PrimarySkillType.NON_CHILD_SKILLS) {
|
||||||
primarySkillType.setHardcoreVampirismEnabled(enable);
|
primarySkillType.setHardcoreVampirismEnabled(enable);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
skill.setHardcoreVampirismEnabled(enable);
|
skill.setHardcoreVampirismEnabled(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -3,12 +3,12 @@ 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.alliance.PartyAllianceCommand;
|
import com.gmail.nossr50.commands.party.alliance.PartyAllianceCommand;
|
||||||
import com.gmail.nossr50.commands.party.teleport.PtpCommand;
|
import com.gmail.nossr50.commands.party.teleport.PtpCommand;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.core.datatypes.party.ShareMode;
|
import com.gmail.nossr50.core.datatypes.party.ShareMode;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
@ -65,8 +65,7 @@ public class PartyInfoCommand implements CommandExecutor {
|
|||||||
|
|
||||||
if (isUnlockedFeature(party, partyFeature)) {
|
if (isUnlockedFeature(party, partyFeature)) {
|
||||||
unlockedPartyFeatures.add(partyFeature.getLocaleString());
|
unlockedPartyFeatures.add(partyFeature.getLocaleString());
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
lockedPartyFeatures.add(partyFeature.getFeatureLockedLocaleString());
|
lockedPartyFeatures.add(partyFeature.getFeatureLockedLocaleString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -46,8 +46,7 @@ public class PartyInviteCommand implements CommandExecutor {
|
|||||||
|
|
||||||
Party playerParty = mcMMOPlayer.getParty();
|
Party playerParty = mcMMOPlayer.getParty();
|
||||||
|
|
||||||
if(PartyManager.isPartyFull(target, playerParty))
|
if (PartyManager.isPartyFull(target, playerParty)) {
|
||||||
{
|
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.Party.PartyFull.Invite", target.getName(), playerParty.toString(), Config.getInstance().getPartyMaxSize()));
|
player.sendMessage(LocaleLoader.getString("Commands.Party.PartyFull.Invite", target.getName(), playerParty.toString(), Config.getInstance().getPartyMaxSize()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.ItemShareType;
|
import com.gmail.nossr50.core.datatypes.party.ItemShareType;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
||||||
@ -8,7 +9,6 @@ import com.gmail.nossr50.core.datatypes.party.ShareMode;
|
|||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.util.StringUtils;
|
import com.gmail.nossr50.core.util.StringUtils;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -41,19 +41,16 @@ public class PartyItemShareCommand implements CommandExecutor {
|
|||||||
|
|
||||||
if (CommandUtils.shouldEnableToggle(args[2])) {
|
if (CommandUtils.shouldEnableToggle(args[2])) {
|
||||||
toggle = true;
|
toggle = true;
|
||||||
}
|
} else if (CommandUtils.shouldDisableToggle(args[2])) {
|
||||||
else if (CommandUtils.shouldDisableToggle(args[2])) {
|
|
||||||
toggle = false;
|
toggle = false;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "itemshare", "<loot | mining | herbalism | woodcutting | misc> <true | false>"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "itemshare", "<loot | mining | herbalism | woodcutting | misc> <true | false>"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
handleToggleItemShareCategory(party, ItemShareType.valueOf(args[1].toUpperCase()), toggle);
|
handleToggleItemShareCategory(party, ItemShareType.valueOf(args[1].toUpperCase()), toggle);
|
||||||
}
|
} catch (IllegalArgumentException ex) {
|
||||||
catch (IllegalArgumentException ex) {
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "itemshare", "<loot | mining | herbalism | woodcutting | misc> <true | false>"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "itemshare", "<loot | mining | herbalism | woodcutting | misc> <true | false>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -54,8 +54,7 @@ public class PartyJoinCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(PartyManager.isPartyFull(player, targetParty))
|
if (PartyManager.isPartyFull(player, targetParty)) {
|
||||||
{
|
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.Party.PartyFull", targetParty.toString()));
|
player.sendMessage(LocaleLoader.getString("Commands.Party.PartyFull", targetParty.toString()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -17,8 +17,7 @@ public class PartyLockCommand implements CommandExecutor {
|
|||||||
case 1:
|
case 1:
|
||||||
if (args[0].equalsIgnoreCase("lock")) {
|
if (args[0].equalsIgnoreCase("lock")) {
|
||||||
togglePartyLock(sender, true);
|
togglePartyLock(sender, true);
|
||||||
}
|
} else if (args[0].equalsIgnoreCase("unlock")) {
|
||||||
else if (args[0].equalsIgnoreCase("unlock")) {
|
|
||||||
togglePartyLock(sender, false);
|
togglePartyLock(sender, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,11 +31,9 @@ public class PartyLockCommand implements CommandExecutor {
|
|||||||
|
|
||||||
if (CommandUtils.shouldEnableToggle(args[1])) {
|
if (CommandUtils.shouldEnableToggle(args[1])) {
|
||||||
togglePartyLock(sender, true);
|
togglePartyLock(sender, true);
|
||||||
}
|
} else if (CommandUtils.shouldDisableToggle(args[1])) {
|
||||||
else if (CommandUtils.shouldDisableToggle(args[1])) {
|
|
||||||
togglePartyLock(sender, false);
|
togglePartyLock(sender, false);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
sendUsageStrings(sender);
|
sendUsageStrings(sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -30,20 +30,15 @@ public enum PartySubcommandType {
|
|||||||
|
|
||||||
if (commandName.equalsIgnoreCase("?")) {
|
if (commandName.equalsIgnoreCase("?")) {
|
||||||
return HELP;
|
return HELP;
|
||||||
}
|
} else if (commandName.equalsIgnoreCase("q") || commandName.equalsIgnoreCase("leave")) {
|
||||||
else if (commandName.equalsIgnoreCase("q") || commandName.equalsIgnoreCase("leave")) {
|
|
||||||
return QUIT;
|
return QUIT;
|
||||||
}
|
} else if (commandName.equalsIgnoreCase("leader")) {
|
||||||
else if (commandName.equalsIgnoreCase("leader")) {
|
|
||||||
return OWNER;
|
return OWNER;
|
||||||
}
|
} else if (commandName.equalsIgnoreCase("xpshare") || commandName.equalsIgnoreCase("shareexp") || commandName.equalsIgnoreCase("sharexp")) {
|
||||||
else if (commandName.equalsIgnoreCase("xpshare") || commandName.equalsIgnoreCase("shareexp") || commandName.equalsIgnoreCase("sharexp")) {
|
|
||||||
return XPSHARE;
|
return XPSHARE;
|
||||||
}
|
} else if (commandName.equalsIgnoreCase("shareitem") || commandName.equalsIgnoreCase("shareitems")) {
|
||||||
else if (commandName.equalsIgnoreCase("shareitem") || commandName.equalsIgnoreCase("shareitems")) {
|
|
||||||
return ITEMSHARE;
|
return ITEMSHARE;
|
||||||
}
|
} else if (commandName.equalsIgnoreCase("ally")) {
|
||||||
else if (commandName.equalsIgnoreCase("ally")) {
|
|
||||||
return ALLIANCE;
|
return ALLIANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.core.datatypes.party.ShareMode;
|
import com.gmail.nossr50.core.datatypes.party.ShareMode;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.util.StringUtils;
|
import com.gmail.nossr50.core.util.StringUtils;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -27,11 +27,9 @@ public class PartyXpShareCommand implements CommandExecutor {
|
|||||||
case 2:
|
case 2:
|
||||||
if (args[1].equalsIgnoreCase("none") || CommandUtils.shouldDisableToggle(args[1])) {
|
if (args[1].equalsIgnoreCase("none") || CommandUtils.shouldDisableToggle(args[1])) {
|
||||||
handleChangingShareMode(party, ShareMode.NONE);
|
handleChangingShareMode(party, ShareMode.NONE);
|
||||||
}
|
} else if (args[1].equalsIgnoreCase("equal") || args[1].equalsIgnoreCase("even") || CommandUtils.shouldEnableToggle(args[1])) {
|
||||||
else if (args[1].equalsIgnoreCase("equal") || args[1].equalsIgnoreCase("even") || CommandUtils.shouldEnableToggle(args[1])) {
|
|
||||||
handleChangingShareMode(party, ShareMode.EQUAL);
|
handleChangingShareMode(party, ShareMode.EQUAL);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "xpshare", "<NONE | EQUAL>"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "xpshare", "<NONE | EQUAL>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.gmail.nossr50.commands.party.alliance;
|
package com.gmail.nossr50.commands.party.alliance;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.gmail.nossr50.commands.party.alliance;
|
package com.gmail.nossr50.commands.party.alliance;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -21,12 +21,10 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class PartyAllianceCommand implements TabExecutor {
|
public class PartyAllianceCommand implements TabExecutor {
|
||||||
|
public static final List<String> ALLIANCE_SUBCOMMANDS = ImmutableList.of("invite", "accept", "disband");
|
||||||
private Player player;
|
private Player player;
|
||||||
private Party playerParty;
|
private Party playerParty;
|
||||||
private Party targetParty;
|
private Party targetParty;
|
||||||
|
|
||||||
public static final List<String> ALLIANCE_SUBCOMMANDS = ImmutableList.of("invite", "accept", "disband");
|
|
||||||
|
|
||||||
private CommandExecutor partyAllianceInviteCommand = new PartyAllianceInviteCommand();
|
private CommandExecutor partyAllianceInviteCommand = new PartyAllianceInviteCommand();
|
||||||
private CommandExecutor partyAllianceAcceptCommand = new PartyAllianceAcceptCommand();
|
private CommandExecutor partyAllianceAcceptCommand = new PartyAllianceAcceptCommand();
|
||||||
private CommandExecutor partyAllianceDisbandCommand = new PartyAllianceDisbandCommand();
|
private CommandExecutor partyAllianceDisbandCommand = new PartyAllianceDisbandCommand();
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.gmail.nossr50.commands.party.alliance;
|
package com.gmail.nossr50.commands.party.alliance;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.gmail.nossr50.commands.party.alliance;
|
package com.gmail.nossr50.commands.party.alliance;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.gmail.nossr50.commands.party.teleport;
|
package com.gmail.nossr50.commands.party.teleport;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.PartyTeleportRecord;
|
import com.gmail.nossr50.core.datatypes.party.PartyTeleportRecord;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -20,8 +20,7 @@ public class PtpAcceptAnyCommand implements CommandExecutor {
|
|||||||
|
|
||||||
if (ptpRecord.isConfirmRequired()) {
|
if (ptpRecord.isConfirmRequired()) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.ptp.AcceptAny.Disabled"));
|
sender.sendMessage(LocaleLoader.getString("Commands.ptp.AcceptAny.Disabled"));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.ptp.AcceptAny.Enabled"));
|
sender.sendMessage(LocaleLoader.getString("Commands.ptp.AcceptAny.Enabled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.gmail.nossr50.commands.party.teleport;
|
package com.gmail.nossr50.commands.party.teleport;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.PartyTeleportRecord;
|
import com.gmail.nossr50.core.datatypes.party.PartyTeleportRecord;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.SkillUtils;
|
import com.gmail.nossr50.core.util.skills.SkillUtils;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -49,8 +49,7 @@ public class PtpAcceptCommand implements CommandExecutor {
|
|||||||
if (!Permissions.partyTeleportWorld(target, targetWorld)) {
|
if (!Permissions.partyTeleportWorld(target, targetWorld)) {
|
||||||
target.sendMessage(LocaleLoader.getString("Commands.ptp.NoWorldPermissions", targetWorld.getName()));
|
target.sendMessage(LocaleLoader.getString("Commands.ptp.NoWorldPermissions", targetWorld.getName()));
|
||||||
return true;
|
return true;
|
||||||
}
|
} else if (targetWorld != playerWorld && !Permissions.partyTeleportWorld(target, playerWorld)) {
|
||||||
else if (targetWorld != playerWorld && !Permissions.partyTeleportWorld(target, playerWorld)) {
|
|
||||||
target.sendMessage(LocaleLoader.getString("Commands.ptp.NoWorldPermissions", playerWorld.getName()));
|
target.sendMessage(LocaleLoader.getString("Commands.ptp.NoWorldPermissions", playerWorld.getName()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2,22 +2,22 @@ package com.gmail.nossr50.commands.party.teleport;
|
|||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
import com.gmail.nossr50.core.config.skills.WorldBlacklist;
|
import com.gmail.nossr50.core.config.skills.WorldBlacklist;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
import com.gmail.nossr50.core.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.core.datatypes.party.PartyTeleportRecord;
|
import com.gmail.nossr50.core.datatypes.party.PartyTeleportRecord;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.runnables.items.TeleportationWarmup;
|
import com.gmail.nossr50.core.runnables.items.TeleportationWarmup;
|
||||||
import com.gmail.nossr50.core.util.EventUtils;
|
import com.gmail.nossr50.core.util.EventUtils;
|
||||||
import com.gmail.nossr50.core.util.Misc;
|
import com.gmail.nossr50.core.util.Misc;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.SkillUtils;
|
import com.gmail.nossr50.core.util.skills.SkillUtils;
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardUtils;
|
import com.gmail.nossr50.core.worldguard.WorldGuardUtils;
|
||||||
|
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;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
@ -36,6 +36,54 @@ public class PtpCommand implements TabExecutor {
|
|||||||
private CommandExecutor ptpAcceptAnyCommand = new PtpAcceptAnyCommand();
|
private CommandExecutor ptpAcceptAnyCommand = new PtpAcceptAnyCommand();
|
||||||
private CommandExecutor ptpAcceptCommand = new PtpAcceptCommand();
|
private CommandExecutor ptpAcceptCommand = new PtpAcceptCommand();
|
||||||
|
|
||||||
|
protected static boolean canTeleport(CommandSender sender, Player player, String targetName) {
|
||||||
|
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName);
|
||||||
|
|
||||||
|
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player target = mcMMOTarget.getPlayer();
|
||||||
|
|
||||||
|
if (player.equals(target)) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.Teleport.Self"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!PartyManager.inSameParty(player, target)) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mcMMOTarget.getPartyTeleportRecord().isEnabled()) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.Teleport.Disabled", targetName));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!target.isValid()) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.Teleport.Dead"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static void handleTeleportWarmup(Player teleportingPlayer, Player targetPlayer) {
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(teleportingPlayer);
|
||||||
|
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetPlayer);
|
||||||
|
|
||||||
|
long warmup = Config.getInstance().getPTPCommandWarmup();
|
||||||
|
|
||||||
|
mcMMOPlayer.actualizeTeleportCommenceLocation(teleportingPlayer);
|
||||||
|
|
||||||
|
if (warmup > 0) {
|
||||||
|
teleportingPlayer.sendMessage(LocaleLoader.getString("Teleport.Commencing", warmup));
|
||||||
|
new TeleportationWarmup(mcMMOPlayer, mcMMOTarget).runTaskLater(mcMMO.p, 20 * warmup);
|
||||||
|
} else {
|
||||||
|
EventUtils.handlePartyTeleportEvent(teleportingPlayer, targetPlayer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
if (CommandUtils.noConsoleUsage(sender)) {
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
@ -45,8 +93,7 @@ public class PtpCommand implements TabExecutor {
|
|||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -171,53 +218,4 @@ public class PtpCommand implements TabExecutor {
|
|||||||
target.sendMessage(LocaleLoader.getString("Commands.ptp.Request1", player.getName()));
|
target.sendMessage(LocaleLoader.getString("Commands.ptp.Request1", player.getName()));
|
||||||
target.sendMessage(LocaleLoader.getString("Commands.ptp.Request2", Config.getInstance().getPTPCommandTimeout()));
|
target.sendMessage(LocaleLoader.getString("Commands.ptp.Request2", Config.getInstance().getPTPCommandTimeout()));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static boolean canTeleport(CommandSender sender, Player player, String targetName) {
|
|
||||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName);
|
|
||||||
|
|
||||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player target = mcMMOTarget.getPlayer();
|
|
||||||
|
|
||||||
if (player.equals(target)) {
|
|
||||||
player.sendMessage(LocaleLoader.getString("Party.Teleport.Self"));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!PartyManager.inSameParty(player, target)) {
|
|
||||||
player.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mcMMOTarget.getPartyTeleportRecord().isEnabled()) {
|
|
||||||
player.sendMessage(LocaleLoader.getString("Party.Teleport.Disabled", targetName));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!target.isValid()) {
|
|
||||||
player.sendMessage(LocaleLoader.getString("Party.Teleport.Dead"));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static void handleTeleportWarmup(Player teleportingPlayer, Player targetPlayer) {
|
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(teleportingPlayer);
|
|
||||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetPlayer);
|
|
||||||
|
|
||||||
long warmup = Config.getInstance().getPTPCommandWarmup();
|
|
||||||
|
|
||||||
mcMMOPlayer.actualizeTeleportCommenceLocation(teleportingPlayer);
|
|
||||||
|
|
||||||
if (warmup > 0) {
|
|
||||||
teleportingPlayer.sendMessage(LocaleLoader.getString("Teleport.Commencing", warmup));
|
|
||||||
new TeleportationWarmup(mcMMOPlayer, mcMMOTarget).runTaskLater(mcMMO.p, 20 * warmup);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
EventUtils.handlePartyTeleportEvent(teleportingPlayer, targetPlayer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.gmail.nossr50.commands.party.teleport;
|
package com.gmail.nossr50.commands.party.teleport;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.party.PartyTeleportRecord;
|
import com.gmail.nossr50.core.datatypes.party.PartyTeleportRecord;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -20,8 +20,7 @@ public class PtpToggleCommand implements CommandExecutor {
|
|||||||
|
|
||||||
if (ptpRecord.isEnabled()) {
|
if (ptpRecord.isEnabled()) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.ptp.Disabled"));
|
sender.sendMessage(LocaleLoader.getString("Commands.ptp.Disabled"));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.ptp.Enabled"));
|
sender.sendMessage(LocaleLoader.getString("Commands.ptp.Enabled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
package com.gmail.nossr50.commands.player;
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
import com.gmail.nossr50.core.datatypes.player.PlayerProfile;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.scoreboards.ScoreboardManager;
|
import com.gmail.nossr50.core.util.scoreboards.ScoreboardManager;
|
||||||
|
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;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -65,8 +65,7 @@ public class InspectCommand implements TabExecutor {
|
|||||||
sender.sendMessage(CommandUtils.displaySkill(profile, skill));
|
sender.sendMessage(CommandUtils.displaySkill(profile, skill));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
Player target = mcMMOPlayer.getPlayer();
|
Player target = mcMMOPlayer.getPlayer();
|
||||||
|
|
||||||
if (CommandUtils.hidden(sender, target, Permissions.inspectHidden(sender))) {
|
if (CommandUtils.hidden(sender, target, Permissions.inspectHidden(sender))) {
|
||||||
@ -74,8 +73,7 @@ public class InspectCommand implements TabExecutor {
|
|||||||
sender.sendMessage(LocaleLoader.getString("Inspect.Offline"));
|
sender.sendMessage(LocaleLoader.getString("Inspect.Offline"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
} else if (CommandUtils.tooFar(sender, target, Permissions.inspectFar(sender))) {
|
||||||
else if (CommandUtils.tooFar(sender, target, Permissions.inspectFar(sender))) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.gmail.nossr50.commands.player;
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
|
||||||
import com.gmail.nossr50.core.skills.SuperAbilityType;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.core.skills.SuperAbilityType;
|
||||||
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.util.scoreboards.ScoreboardManager;
|
import com.gmail.nossr50.core.util.scoreboards.ScoreboardManager;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -52,8 +52,7 @@ public class MccooldownCommand implements TabExecutor {
|
|||||||
|
|
||||||
if (seconds <= 0) {
|
if (seconds <= 0) {
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Row.Y", ability.getName()));
|
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Row.Y", ability.getName()));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Row.N", ability.getName(), seconds));
|
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Row.N", ability.getName(), seconds));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.gmail.nossr50.commands.player;
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.runnables.commands.McrankCommandAsyncTask;
|
import com.gmail.nossr50.core.runnables.commands.McrankCommandAsyncTask;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
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;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -61,8 +61,7 @@ public class McrankCommand implements TabExecutor {
|
|||||||
if (CommandUtils.tooFar(sender, player, Permissions.mcrankFar(sender))) {
|
if (CommandUtils.tooFar(sender, player, Permissions.mcrankFar(sender))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
} else if (CommandUtils.inspectOffline(sender, mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false), Permissions.mcrankOffline(sender))) {
|
||||||
else if (CommandUtils.inspectOffline(sender, mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false), Permissions.mcrankOffline(sender))) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.gmail.nossr50.commands.player;
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.scoreboards.ScoreboardManager;
|
import com.gmail.nossr50.core.util.scoreboards.ScoreboardManager;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -47,8 +47,7 @@ public class McstatsCommand implements TabExecutor {
|
|||||||
|
|
||||||
if (powerLevelCap != Integer.MAX_VALUE) {
|
if (powerLevelCap != Integer.MAX_VALUE) {
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Capped", UserManager.getPlayer(player).getPowerLevel(), powerLevelCap));
|
player.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Capped", UserManager.getPlayer(player).getPowerLevel(), powerLevelCap));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.PowerLevel", UserManager.getPlayer(player).getPowerLevel()));
|
player.sendMessage(LocaleLoader.getString("Commands.PowerLevel", UserManager.getPlayer(player).getPowerLevel()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
package com.gmail.nossr50.commands.player;
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.runnables.commands.MctopCommandAsyncTask;
|
import com.gmail.nossr50.core.runnables.commands.MctopCommandAsyncTask;
|
||||||
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.StringUtils;
|
import com.gmail.nossr50.core.util.StringUtils;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
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;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.skills.subskills.AbstractSubSkill;
|
import com.gmail.nossr50.core.skills.subskills.AbstractSubSkill;
|
||||||
import com.gmail.nossr50.listeners.InteractionManager;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.util.random.RandomChanceSkill;
|
import com.gmail.nossr50.core.util.random.RandomChanceSkill;
|
||||||
import com.gmail.nossr50.core.util.random.RandomChanceUtil;
|
import com.gmail.nossr50.core.util.random.RandomChanceUtil;
|
||||||
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
||||||
|
import com.gmail.nossr50.listeners.InteractionManager;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@ -55,8 +55,7 @@ public class AcrobaticsCommand extends SkillCommand {
|
|||||||
|
|
||||||
AbstractSubSkill abstractSubSkill = InteractionManager.getAbstractByName("Roll");
|
AbstractSubSkill abstractSubSkill = InteractionManager.getAbstractByName("Roll");
|
||||||
|
|
||||||
if(abstractSubSkill != null)
|
if (abstractSubSkill != null) {
|
||||||
{
|
|
||||||
double rollChance, graceChance;
|
double rollChance, graceChance;
|
||||||
|
|
||||||
//Chance to roll at half
|
//Chance to roll at half
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.alchemy.AlchemyManager;
|
import com.gmail.nossr50.core.skills.primary.alchemy.AlchemyManager;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -16,10 +16,9 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class AprilCommand implements TabExecutor {
|
public class AprilCommand implements TabExecutor {
|
||||||
private String skillName;
|
|
||||||
|
|
||||||
protected DecimalFormat percent = new DecimalFormat("##0.00%");
|
protected DecimalFormat percent = new DecimalFormat("##0.00%");
|
||||||
protected DecimalFormat decimal = new DecimalFormat("##0.00");
|
protected DecimalFormat decimal = new DecimalFormat("##0.00");
|
||||||
|
private String skillName;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.archery.Archery;
|
import com.gmail.nossr50.core.skills.primary.archery.Archery;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.axes.Axes;
|
import com.gmail.nossr50.core.skills.primary.axes.Axes;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
|
@ -2,15 +2,15 @@ package com.gmail.nossr50.commands.skills;
|
|||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.AdvancedConfig;
|
import com.gmail.nossr50.core.config.skills.AdvancedConfig;
|
||||||
import com.gmail.nossr50.core.config.treasure.TreasureConfig;
|
import com.gmail.nossr50.core.config.treasure.TreasureConfig;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.skills.treasure.Rarity;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.fishing.Fishing;
|
import com.gmail.nossr50.core.skills.primary.fishing.Fishing;
|
||||||
import com.gmail.nossr50.core.skills.primary.fishing.FishingManager;
|
import com.gmail.nossr50.core.skills.primary.fishing.FishingManager;
|
||||||
|
import com.gmail.nossr50.core.skills.treasure.Rarity;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.random.RandomChanceUtil;
|
import com.gmail.nossr50.core.util.random.RandomChanceUtil;
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
@ -45,7 +45,8 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
|
|
||||||
// DOUBLE DROPS
|
// DOUBLE DROPS
|
||||||
if (canDoubleDrop) {
|
if (canDoubleDrop) {
|
||||||
String[] doubleDropStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.HERBALISM_DOUBLE_DROPS);;
|
String[] doubleDropStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.HERBALISM_DOUBLE_DROPS);
|
||||||
|
;
|
||||||
doubleDropChance = doubleDropStrings[0];
|
doubleDropChance = doubleDropStrings[0];
|
||||||
doubleDropChanceLucky = doubleDropStrings[1];
|
doubleDropChanceLucky = doubleDropStrings[1];
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.mining.MiningManager;
|
import com.gmail.nossr50.core.skills.primary.mining.MiningManager;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.skills.subskills.AbstractSubSkill;
|
import com.gmail.nossr50.core.skills.subskills.AbstractSubSkill;
|
||||||
import com.gmail.nossr50.listeners.InteractionManager;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
|
import com.gmail.nossr50.listeners.InteractionManager;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -27,26 +27,22 @@ public class MmoInfoCommand implements TabExecutor {
|
|||||||
/*
|
/*
|
||||||
* Only allow players to use this command
|
* Only allow players to use this command
|
||||||
*/
|
*/
|
||||||
if(commandSender instanceof Player)
|
if (commandSender instanceof Player) {
|
||||||
{
|
|
||||||
if (args.length < 1)
|
if (args.length < 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Player player = (Player) commandSender;
|
Player player = (Player) commandSender;
|
||||||
if(Permissions.mmoinfo(player))
|
if (Permissions.mmoinfo(player)) {
|
||||||
{
|
|
||||||
if (args == null || args[0] == null)
|
if (args == null || args[0] == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(args[0].equalsIgnoreCase( "???"))
|
if (args[0].equalsIgnoreCase("???")) {
|
||||||
{
|
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.Header"));
|
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.Header"));
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.SubSkillHeader", "???"));
|
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.SubSkillHeader", "???"));
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.DetailsHeader"));
|
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.DetailsHeader"));
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.Mystery"));
|
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.Mystery"));
|
||||||
return true;
|
return true;
|
||||||
} else if(InteractionManager.getAbstractByName(args[0]) != null || PrimarySkillType.SUBSKILL_NAMES.contains(args[0]))
|
} else if (InteractionManager.getAbstractByName(args[0]) != null || PrimarySkillType.SUBSKILL_NAMES.contains(args[0])) {
|
||||||
{
|
|
||||||
displayInfo(player, args[0]);
|
displayInfo(player, args[0]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -70,12 +66,10 @@ public class MmoInfoCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayInfo(Player player, String subSkillName)
|
private void displayInfo(Player player, 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);
|
||||||
if(abstractSubSkill != null)
|
if (abstractSubSkill != null) {
|
||||||
{
|
|
||||||
/* New System Skills are programmable */
|
/* New System Skills are programmable */
|
||||||
abstractSubSkill.printInfo(player);
|
abstractSubSkill.printInfo(player);
|
||||||
//TextComponentFactory.sendPlayerUrlHeader(player);
|
//TextComponentFactory.sendPlayerUrlHeader(player);
|
||||||
@ -89,8 +83,7 @@ public class MmoInfoCommand implements TabExecutor {
|
|||||||
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.OldSkill"));
|
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.OldSkill"));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(SubSkillType subSkillType : SubSkillType.values())
|
for (SubSkillType subSkillType : SubSkillType.values()) {
|
||||||
{
|
|
||||||
if (subSkillType.getNiceNameNoSpaces(subSkillType).equalsIgnoreCase(subSkillName))
|
if (subSkillType.getNiceNameNoSpaces(subSkillType).equalsIgnoreCase(subSkillName))
|
||||||
subSkillName = subSkillType.getWikiName(subSkillType.toString());
|
subSkillName = subSkillType.getWikiName(subSkillType.toString());
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.MaterialType;
|
import com.gmail.nossr50.core.skills.MaterialType;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.repair.ArcaneForging;
|
import com.gmail.nossr50.core.skills.primary.repair.ArcaneForging;
|
||||||
import com.gmail.nossr50.core.skills.primary.repair.Repair;
|
import com.gmail.nossr50.core.skills.primary.repair.Repair;
|
||||||
import com.gmail.nossr50.core.skills.primary.repair.RepairManager;
|
import com.gmail.nossr50.core.skills.primary.repair.RepairManager;
|
||||||
import com.gmail.nossr50.core.skills.primary.repair.repairables.Repairable;
|
import com.gmail.nossr50.core.skills.primary.repair.repairables.Repairable;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.skills.child.salvage.Salvage;
|
import com.gmail.nossr50.core.skills.child.salvage.Salvage;
|
||||||
import com.gmail.nossr50.core.skills.child.salvage.SalvageManager;
|
import com.gmail.nossr50.core.skills.child.salvage.SalvageManager;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -2,16 +2,16 @@ package com.gmail.nossr50.commands.skills;
|
|||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.AdvancedConfig;
|
import com.gmail.nossr50.core.config.skills.AdvancedConfig;
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.skills.child.FamilyTree;
|
import com.gmail.nossr50.core.skills.child.FamilyTree;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.StringUtils;
|
import com.gmail.nossr50.core.util.StringUtils;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
import com.gmail.nossr50.core.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.random.RandomChanceUtil;
|
import com.gmail.nossr50.core.util.random.RandomChanceUtil;
|
||||||
import com.gmail.nossr50.core.util.scoreboards.ScoreboardManager;
|
import com.gmail.nossr50.core.util.scoreboards.ScoreboardManager;
|
||||||
import com.gmail.nossr50.core.util.skills.PerksUtils;
|
import com.gmail.nossr50.core.util.skills.PerksUtils;
|
||||||
@ -33,11 +33,9 @@ import java.util.Set;
|
|||||||
|
|
||||||
public abstract class SkillCommand implements TabExecutor {
|
public abstract class SkillCommand implements TabExecutor {
|
||||||
protected PrimarySkillType skill;
|
protected PrimarySkillType skill;
|
||||||
private String skillName;
|
|
||||||
|
|
||||||
protected DecimalFormat percent = new DecimalFormat("##0.00%");
|
protected DecimalFormat percent = new DecimalFormat("##0.00%");
|
||||||
protected DecimalFormat decimal = new DecimalFormat("##0.00");
|
protected DecimalFormat decimal = new DecimalFormat("##0.00");
|
||||||
|
private String skillName;
|
||||||
private CommandExecutor skillGuideCommand;
|
private CommandExecutor skillGuideCommand;
|
||||||
|
|
||||||
public SkillCommand(PrimarySkillType skill) {
|
public SkillCommand(PrimarySkillType skill) {
|
||||||
@ -46,6 +44,15 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
skillGuideCommand = new SkillGuideCommand(skill);
|
skillGuideCommand = new SkillGuideCommand(skill);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String[] addItemToFirstPositionOfArray(String itemToAdd, String... existingArray) {
|
||||||
|
String[] newArray = new String[existingArray.length + 1];
|
||||||
|
newArray[0] = itemToAdd;
|
||||||
|
|
||||||
|
System.arraycopy(existingArray, 0, newArray, 1, existingArray.length);
|
||||||
|
|
||||||
|
return newArray;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
if (CommandUtils.noConsoleUsage(sender)) {
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
@ -67,8 +74,7 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
|
|
||||||
//Send the players a few blank lines to make finding the top of the skill command easier
|
//Send the players a few blank lines to make finding the top of the skill command easier
|
||||||
if (AdvancedConfig.getInstance().doesSkillCommandSendBlankLines())
|
if (AdvancedConfig.getInstance().doesSkillCommandSendBlankLines())
|
||||||
for(int i = 0; i < 2; i++)
|
for (int i = 0; i < 2; i++) {
|
||||||
{
|
|
||||||
player.sendMessage("");
|
player.sendMessage("");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,8 +105,7 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
|
|
||||||
|
|
||||||
//Link Header
|
//Link Header
|
||||||
if(Config.getInstance().getUrlLinksEnabled())
|
if (Config.getInstance().getUrlLinksEnabled()) {
|
||||||
{
|
|
||||||
player.sendMessage(LocaleLoader.getString("Overhaul.mcMMO.Header"));
|
player.sendMessage(LocaleLoader.getString("Overhaul.mcMMO.Header"));
|
||||||
TextComponentFactory.sendPlayerUrlHeader(player);
|
TextComponentFactory.sendPlayerUrlHeader(player);
|
||||||
}
|
}
|
||||||
@ -138,8 +143,7 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
|
|
||||||
player.sendMessage(LocaleLoader.getString("Skills.Overhaul.Header", skillName));
|
player.sendMessage(LocaleLoader.getString("Skills.Overhaul.Header", skillName));
|
||||||
|
|
||||||
if(!skill.isChildSkill())
|
if (!skill.isChildSkill()) {
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
* NON-CHILD SKILLS
|
* NON-CHILD SKILLS
|
||||||
*/
|
*/
|
||||||
@ -162,15 +166,14 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
//TODO: Add JSON here
|
//TODO: Add JSON here
|
||||||
for (PrimarySkillType parent : parents) {
|
for (PrimarySkillType parent : parents) {
|
||||||
parentList.add(parent);
|
parentList.add(parent);
|
||||||
/*player.sendMessage(parent.getName() + " - " + LocaleLoader.getString("Effects.Level.Overhaul", mcMMOPlayer.getSkillLevel(parent), mcMMOPlayer.getSkillXpLevel(parent), mcMMOPlayer.getXpToLevel(parent)))*/;
|
/*player.sendMessage(parent.getName() + " - " + LocaleLoader.getString("Effects.Level.Overhaul", mcMMOPlayer.getSkillLevel(parent), mcMMOPlayer.getSkillXpLevel(parent), mcMMOPlayer.getXpToLevel(parent)))*/
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
String parentMessage = "";
|
String parentMessage = "";
|
||||||
|
|
||||||
for(int i = 0; i < parentList.size(); i++)
|
for (int i = 0; i < parentList.size(); i++) {
|
||||||
{
|
if (i + 1 < parentList.size()) {
|
||||||
if(i+1 < parentList.size())
|
|
||||||
{
|
|
||||||
parentMessage += LocaleLoader.getString("Effects.Child.ParentList", parentList.get(i).getName(), mcMMOPlayer.getSkillLevel(parentList.get(i)));
|
parentMessage += LocaleLoader.getString("Effects.Child.ParentList", parentList.get(i).getName(), mcMMOPlayer.getSkillLevel(parentList.get(i)));
|
||||||
parentMessage += ChatColor.GRAY + ", ";
|
parentMessage += ChatColor.GRAY + ", ";
|
||||||
} else {
|
} else {
|
||||||
@ -231,11 +234,9 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
|
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
if(abilityLengthCap <= 0)
|
if (abilityLengthCap <= 0) {
|
||||||
{
|
|
||||||
length = 2 + (int) (skillValue / abilityLengthVar);
|
length = 2 + (int) (skillValue / abilityLengthVar);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
length = 2 + (int) (Math.min(abilityLengthCap, skillValue) / abilityLengthVar);
|
length = 2 + (int) (Math.min(abilityLengthCap, skillValue) / abilityLengthVar);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,37 +249,24 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
return new String[]{String.valueOf(length), String.valueOf(enduranceLength)};
|
return new String[]{String.valueOf(length), String.valueOf(enduranceLength)};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getStatMessage(SubSkillType subSkillType, String... vars)
|
protected String getStatMessage(SubSkillType subSkillType, String... vars) {
|
||||||
{
|
|
||||||
return getStatMessage(false, false, subSkillType, vars);
|
return getStatMessage(false, false, subSkillType, vars);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getStatMessage(boolean isExtra, boolean isCustom, SubSkillType subSkillType, String... vars)
|
protected String getStatMessage(boolean isExtra, boolean isCustom, SubSkillType subSkillType, String... vars) {
|
||||||
{
|
|
||||||
String templateKey = isCustom ? "Ability.Generic.Template.Custom" : "Ability.Generic.Template";
|
String templateKey = isCustom ? "Ability.Generic.Template.Custom" : "Ability.Generic.Template";
|
||||||
String statDescriptionKey = !isExtra ? subSkillType.getLocaleKeyStatDescription() : subSkillType.getLocaleKeyStatExtraDescription();
|
String statDescriptionKey = !isExtra ? subSkillType.getLocaleKeyStatDescription() : subSkillType.getLocaleKeyStatExtraDescription();
|
||||||
|
|
||||||
if (isCustom)
|
if (isCustom)
|
||||||
//Cast to Object[] to suppress warnings
|
//Cast to Object[] to suppress warnings
|
||||||
return LocaleLoader.getString(templateKey, LocaleLoader.getString(statDescriptionKey, (Object[]) vars));
|
return LocaleLoader.getString(templateKey, LocaleLoader.getString(statDescriptionKey, (Object[]) vars));
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
String[] mergedList = addItemToFirstPositionOfArray(LocaleLoader.getString(statDescriptionKey), vars);
|
String[] mergedList = addItemToFirstPositionOfArray(LocaleLoader.getString(statDescriptionKey), vars);
|
||||||
//Cast to Object[] to suppress warnings
|
//Cast to Object[] to suppress warnings
|
||||||
return LocaleLoader.getString(templateKey, (Object[]) mergedList);
|
return LocaleLoader.getString(templateKey, (Object[]) mergedList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static String[] addItemToFirstPositionOfArray(String itemToAdd, String... existingArray) {
|
|
||||||
String[] newArray = new String[existingArray.length + 1];
|
|
||||||
newArray[0] = itemToAdd;
|
|
||||||
|
|
||||||
System.arraycopy(existingArray, 0, newArray, 1, existingArray.length);
|
|
||||||
|
|
||||||
return newArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract void dataCalculations(Player player, float skillValue);
|
protected abstract void dataCalculations(Player player, float skillValue);
|
||||||
|
|
||||||
protected abstract void permissionsCheck(Player player);
|
protected abstract void permissionsCheck(Player player);
|
||||||
@ -291,12 +279,12 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a player can use a skill
|
* Checks if a player can use a skill
|
||||||
|
*
|
||||||
* @param player target player
|
* @param player target player
|
||||||
* @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(Player player, SubSkillType subSkillType)
|
protected boolean canUseSubskill(Player player, SubSkillType subSkillType) {
|
||||||
{
|
|
||||||
return Permissions.isSubSkillEnabled(player, subSkillType) && RankUtils.hasUnlockedSubskill(player, subSkillType);
|
return Permissions.isSubSkillEnabled(player, subSkillType) && RankUtils.hasUnlockedSubskill(player, subSkillType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.util.StringUtils;
|
import com.gmail.nossr50.core.util.StringUtils;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
@ -75,8 +75,7 @@ public class SkillGuideCommand implements CommandExecutor {
|
|||||||
while (allStrings.size() < 9) {
|
while (allStrings.size() < 9) {
|
||||||
if (pageIndexStart + allStrings.size() > guide.size()) {
|
if (pageIndexStart + allStrings.size() > guide.size()) {
|
||||||
allStrings.add("");
|
allStrings.add("");
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
allStrings.add(guide.get(pageIndexStart + (allStrings.size() - 1)));
|
allStrings.add(guide.get(pageIndexStart + (allStrings.size() - 1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.skills.child.smelting.Smelting;
|
import com.gmail.nossr50.core.skills.child.smelting.Smelting;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.AdvancedConfig;
|
import com.gmail.nossr50.core.config.skills.AdvancedConfig;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.taming.Taming;
|
import com.gmail.nossr50.core.skills.primary.taming.Taming;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
import com.gmail.nossr50.core.util.skills.SkillActivationType;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
@ -39,7 +39,8 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
protected void dataCalculations(Player player, float skillValue) {
|
protected void dataCalculations(Player player, float skillValue) {
|
||||||
// UNARMED_ARROW_DEFLECT
|
// UNARMED_ARROW_DEFLECT
|
||||||
if (canDeflect) {
|
if (canDeflect) {
|
||||||
String[] deflectStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.UNARMED_ARROW_DEFLECT);;
|
String[] deflectStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.UNARMED_ARROW_DEFLECT);
|
||||||
|
;
|
||||||
deflectChance = deflectStrings[0];
|
deflectChance = deflectStrings[0];
|
||||||
deflectChanceLucky = deflectStrings[1];
|
deflectChanceLucky = deflectStrings[1];
|
||||||
}
|
}
|
||||||
@ -53,7 +54,8 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
|
|
||||||
// UNARMED_DISARM
|
// UNARMED_DISARM
|
||||||
if (canDisarm) {
|
if (canDisarm) {
|
||||||
String[] disarmStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.UNARMED_DISARM);;
|
String[] disarmStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.UNARMED_DISARM);
|
||||||
|
;
|
||||||
disarmChance = disarmStrings[0];
|
disarmChance = disarmStrings[0];
|
||||||
disarmChanceLucky = disarmStrings[1];
|
disarmChanceLucky = disarmStrings[1];
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.util.TextComponentFactory;
|
import com.gmail.nossr50.core.util.TextComponentFactory;
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
@ -46,7 +46,8 @@ public class WoodcuttingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setDoubleDropClassicChanceStrings(Player player) {
|
private void setDoubleDropClassicChanceStrings(Player player) {
|
||||||
String[] doubleDropStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.WOODCUTTING_HARVEST_LUMBER);;
|
String[] doubleDropStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.WOODCUTTING_HARVEST_LUMBER);
|
||||||
|
;
|
||||||
doubleDropChance = doubleDropStrings[0];
|
doubleDropChance = doubleDropStrings[0];
|
||||||
doubleDropChanceLucky = doubleDropStrings[1];
|
doubleDropChanceLucky = doubleDropStrings[1];
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,10 @@ import org.bukkit.event.HandlerList;
|
|||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
public abstract class McMMOChatEvent extends Event implements Cancellable {
|
public abstract class McMMOChatEvent extends Event implements Cancellable {
|
||||||
|
/**
|
||||||
|
* Rest of file is required boilerplate for custom events
|
||||||
|
**/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
private Plugin plugin;
|
private Plugin plugin;
|
||||||
private String sender;
|
private String sender;
|
||||||
@ -27,6 +31,10 @@ public abstract class McMMOChatEvent extends Event implements Cancellable {
|
|||||||
this.message = message;
|
this.message = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The plugin responsible for this event, note this can be null
|
* @return The plugin responsible for this event, note this can be null
|
||||||
*/
|
*/
|
||||||
@ -48,13 +56,6 @@ public abstract class McMMOChatEvent extends Event implements Cancellable {
|
|||||||
return displayName;
|
return displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return String message that will be sent
|
|
||||||
*/
|
|
||||||
public String getMessage() {
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param displayName String display name of the player who sent the chat
|
* @param displayName String display name of the player who sent the chat
|
||||||
*/
|
*/
|
||||||
@ -62,6 +63,13 @@ public abstract class McMMOChatEvent extends Event implements Cancellable {
|
|||||||
this.displayName = displayName;
|
this.displayName = displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return String message that will be sent
|
||||||
|
*/
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param message String message to be sent in chat
|
* @param message String message to be sent in chat
|
||||||
*/
|
*/
|
||||||
@ -69,7 +77,9 @@ public abstract class McMMOChatEvent extends Event implements Cancellable {
|
|||||||
this.message = message;
|
this.message = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Following are required for Cancellable **/
|
/**
|
||||||
|
* Following are required for Cancellable
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
return cancelled;
|
return cancelled;
|
||||||
@ -80,15 +90,8 @@ public abstract class McMMOChatEvent extends Event implements Cancellable {
|
|||||||
this.cancelled = cancelled;
|
this.cancelled = cancelled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Rest of file is required boilerplate for custom events **/
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.gmail.nossr50.events.experience;
|
package com.gmail.nossr50.events.experience;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.core.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
@ -12,10 +12,11 @@ import org.bukkit.event.player.PlayerEvent;
|
|||||||
* Generic event for mcMMO experience events.
|
* Generic event for mcMMO experience events.
|
||||||
*/
|
*/
|
||||||
public abstract class McMMOPlayerExperienceEvent extends PlayerEvent implements Cancellable {
|
public abstract class McMMOPlayerExperienceEvent extends PlayerEvent implements Cancellable {
|
||||||
private boolean cancelled;
|
private static final HandlerList handlers = new HandlerList();
|
||||||
protected PrimarySkillType skill;
|
protected PrimarySkillType skill;
|
||||||
protected int skillLevel;
|
protected int skillLevel;
|
||||||
protected XPGainReason xpGainReason;
|
protected XPGainReason xpGainReason;
|
||||||
|
private boolean cancelled;
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
protected McMMOPlayerExperienceEvent(Player player, PrimarySkillType skill) {
|
protected McMMOPlayerExperienceEvent(Player player, PrimarySkillType skill) {
|
||||||
@ -32,6 +33,10 @@ public abstract class McMMOPlayerExperienceEvent extends PlayerEvent implements
|
|||||||
this.xpGainReason = xpGainReason;
|
this.xpGainReason = xpGainReason;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The skill involved in this event
|
* @return The skill involved in this event
|
||||||
*/
|
*/
|
||||||
@ -53,7 +58,9 @@ public abstract class McMMOPlayerExperienceEvent extends PlayerEvent implements
|
|||||||
return xpGainReason;
|
return xpGainReason;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Following are required for Cancellable **/
|
/**
|
||||||
|
* Following are required for Cancellable
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
return cancelled;
|
return cancelled;
|
||||||
@ -64,14 +71,8 @@ public abstract class McMMOPlayerExperienceEvent extends PlayerEvent implements
|
|||||||
this.cancelled = cancelled;
|
this.cancelled = cancelled;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import org.bukkit.event.HandlerList;
|
|||||||
* Called when a user loses levels in a skill
|
* Called when a user loses levels in a skill
|
||||||
*/
|
*/
|
||||||
public class McMMOPlayerLevelDownEvent extends McMMOPlayerLevelChangeEvent {
|
public class McMMOPlayerLevelDownEvent extends McMMOPlayerLevelChangeEvent {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private int levelsLost;
|
private int levelsLost;
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@ -33,11 +34,8 @@ public class McMMOPlayerLevelDownEvent extends McMMOPlayerLevelChangeEvent {
|
|||||||
this.levelsLost = levelsLost;
|
this.levelsLost = levelsLost;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static HandlerList getHandlerList() {
|
||||||
* @param levelsLost Set the number of levels lost in this event
|
return handlers;
|
||||||
*/
|
|
||||||
public void setLevelsLost(int levelsLost) {
|
|
||||||
this.levelsLost = levelsLost;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -47,14 +45,15 @@ public class McMMOPlayerLevelDownEvent extends McMMOPlayerLevelChangeEvent {
|
|||||||
return levelsLost;
|
return levelsLost;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
/**
|
||||||
|
* @param levelsLost Set the number of levels lost in this event
|
||||||
|
*/
|
||||||
|
public void setLevelsLost(int levelsLost) {
|
||||||
|
this.levelsLost = levelsLost;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import org.bukkit.event.HandlerList;
|
|||||||
* Called when a user levels up in a skill
|
* Called when a user levels up in a skill
|
||||||
*/
|
*/
|
||||||
public class McMMOPlayerLevelUpEvent extends McMMOPlayerLevelChangeEvent {
|
public class McMMOPlayerLevelUpEvent extends McMMOPlayerLevelChangeEvent {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private int levelsGained;
|
private int levelsGained;
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@ -33,11 +34,8 @@ public class McMMOPlayerLevelUpEvent extends McMMOPlayerLevelChangeEvent {
|
|||||||
this.levelsGained = levelsGained;
|
this.levelsGained = levelsGained;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static HandlerList getHandlerList() {
|
||||||
* @param levelsGained Set the number of levels gained in this event
|
return handlers;
|
||||||
*/
|
|
||||||
public void setLevelsGained(int levelsGained) {
|
|
||||||
this.levelsGained = levelsGained;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -47,14 +45,15 @@ public class McMMOPlayerLevelUpEvent extends McMMOPlayerLevelChangeEvent {
|
|||||||
return levelsGained;
|
return levelsGained;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
/**
|
||||||
|
* @param levelsGained Set the number of levels gained in this event
|
||||||
|
*/
|
||||||
|
public void setLevelsGained(int levelsGained) {
|
||||||
|
this.levelsGained = levelsGained;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import org.bukkit.event.HandlerList;
|
|||||||
* Called when a player gains XP in a skill
|
* Called when a player gains XP in a skill
|
||||||
*/
|
*/
|
||||||
public class McMMOPlayerXpGainEvent extends McMMOPlayerExperienceEvent {
|
public class McMMOPlayerXpGainEvent extends McMMOPlayerExperienceEvent {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private float xpGained;
|
private float xpGained;
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@ -22,6 +23,10 @@ public class McMMOPlayerXpGainEvent extends McMMOPlayerExperienceEvent {
|
|||||||
this.xpGained = xpGained;
|
this.xpGained = xpGained;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The amount of experience gained in this event
|
* @return The amount of experience gained in this event
|
||||||
*/
|
*/
|
||||||
@ -29,6 +34,13 @@ public class McMMOPlayerXpGainEvent extends McMMOPlayerExperienceEvent {
|
|||||||
return xpGained;
|
return xpGained;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param xpGained int amount of experience gained in this event
|
||||||
|
*/
|
||||||
|
public void setRawXpGained(float xpGained) {
|
||||||
|
this.xpGained = xpGained;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int amount of experience gained in this event
|
* @return int amount of experience gained in this event
|
||||||
*/
|
*/
|
||||||
@ -37,13 +49,6 @@ public class McMMOPlayerXpGainEvent extends McMMOPlayerExperienceEvent {
|
|||||||
return (int) xpGained;
|
return (int) xpGained;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param xpGained int amount of experience gained in this event
|
|
||||||
*/
|
|
||||||
public void setRawXpGained(float xpGained) {
|
|
||||||
this.xpGained = xpGained;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param xpGained int amount of experience gained in this event
|
* @param xpGained int amount of experience gained in this event
|
||||||
*/
|
*/
|
||||||
@ -52,14 +57,8 @@ public class McMMOPlayerXpGainEvent extends McMMOPlayerExperienceEvent {
|
|||||||
this.xpGained = xpGained;
|
this.xpGained = xpGained;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,12 @@ import org.bukkit.event.player.PlayerEvent;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class McMMOPlayerDeathPenaltyEvent extends PlayerEvent implements Cancellable {
|
public class McMMOPlayerDeathPenaltyEvent extends PlayerEvent implements Cancellable {
|
||||||
|
/**
|
||||||
|
* Rest of file is required boilerplate for custom events
|
||||||
|
**/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private HashMap<String, Integer> levelChanged;
|
private HashMap<String, Integer> levelChanged;
|
||||||
private HashMap<String, Float> experienceChanged;
|
private HashMap<String, Float> experienceChanged;
|
||||||
|
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
|
|
||||||
public McMMOPlayerDeathPenaltyEvent(Player player, HashMap<String, Integer> levelChanged, HashMap<String, Float> experienceChanged) {
|
public McMMOPlayerDeathPenaltyEvent(Player player, HashMap<String, Integer> levelChanged, HashMap<String, Float> experienceChanged) {
|
||||||
@ -26,6 +29,10 @@ public class McMMOPlayerDeathPenaltyEvent extends PlayerEvent implements Cancell
|
|||||||
this.cancelled = false;
|
this.cancelled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
public HashMap<String, Integer> getLevelChanged() {
|
public HashMap<String, Integer> getLevelChanged() {
|
||||||
return levelChanged;
|
return levelChanged;
|
||||||
}
|
}
|
||||||
@ -42,7 +49,9 @@ public class McMMOPlayerDeathPenaltyEvent extends PlayerEvent implements Cancell
|
|||||||
this.experienceChanged = experienceChanged;
|
this.experienceChanged = experienceChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Following are required for Cancellable **/
|
/**
|
||||||
|
* Following are required for Cancellable
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
return cancelled;
|
return cancelled;
|
||||||
@ -53,15 +62,8 @@ public class McMMOPlayerDeathPenaltyEvent extends PlayerEvent implements Cancell
|
|||||||
this.cancelled = cancelled;
|
this.cancelled = cancelled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Rest of file is required boilerplate for custom events **/
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,10 @@ import org.bukkit.event.HandlerList;
|
|||||||
import org.bukkit.event.player.PlayerEvent;
|
import org.bukkit.event.player.PlayerEvent;
|
||||||
|
|
||||||
public class McMMOPlayerPreDeathPenaltyEvent extends PlayerEvent implements Cancellable {
|
public class McMMOPlayerPreDeathPenaltyEvent extends PlayerEvent implements Cancellable {
|
||||||
|
/**
|
||||||
|
* Rest of file is required boilerplate for custom events
|
||||||
|
**/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
|
|
||||||
public McMMOPlayerPreDeathPenaltyEvent(Player player) {
|
public McMMOPlayerPreDeathPenaltyEvent(Player player) {
|
||||||
@ -13,7 +17,13 @@ public class McMMOPlayerPreDeathPenaltyEvent extends PlayerEvent implements Canc
|
|||||||
this.cancelled = false;
|
this.cancelled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Following are required for Cancellable **/
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Following are required for Cancellable
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
return cancelled;
|
return cancelled;
|
||||||
@ -24,15 +34,8 @@ public class McMMOPlayerPreDeathPenaltyEvent extends PlayerEvent implements Canc
|
|||||||
this.cancelled = cancelled;
|
this.cancelled = cancelled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Rest of file is required boilerplate for custom events **/
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,10 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
* Called when mcMMO is preparing to drop an item.
|
* Called when mcMMO is preparing to drop an item.
|
||||||
*/
|
*/
|
||||||
public class McMMOItemSpawnEvent extends Event implements Cancellable {
|
public class McMMOItemSpawnEvent extends Event implements Cancellable {
|
||||||
|
/**
|
||||||
|
* Rest of file is required boilerplate for custom events
|
||||||
|
**/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private Location location;
|
private Location location;
|
||||||
private ItemStack itemStack;
|
private ItemStack itemStack;
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
@ -20,6 +24,10 @@ public class McMMOItemSpawnEvent extends Event implements Cancellable {
|
|||||||
this.cancelled = false;
|
this.cancelled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Location where the item will be dropped
|
* @return Location where the item will be dropped
|
||||||
*/
|
*/
|
||||||
@ -48,7 +56,9 @@ public class McMMOItemSpawnEvent extends Event implements Cancellable {
|
|||||||
this.itemStack = itemStack;
|
this.itemStack = itemStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Following are required for Cancellable **/
|
/**
|
||||||
|
* Following are required for Cancellable
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
return cancelled;
|
return cancelled;
|
||||||
@ -59,15 +69,8 @@ public class McMMOItemSpawnEvent extends Event implements Cancellable {
|
|||||||
this.cancelled = cancelled;
|
this.cancelled = cancelled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Rest of file is required boilerplate for custom events **/
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,10 @@ import org.bukkit.event.HandlerList;
|
|||||||
import org.bukkit.event.player.PlayerEvent;
|
import org.bukkit.event.player.PlayerEvent;
|
||||||
|
|
||||||
public class McMMOPartyAllianceChangeEvent extends PlayerEvent implements Cancellable {
|
public class McMMOPartyAllianceChangeEvent extends PlayerEvent implements Cancellable {
|
||||||
|
/**
|
||||||
|
* Rest of file is required boilerplate for custom events
|
||||||
|
**/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private String oldAlly;
|
private String oldAlly;
|
||||||
private String newAlly;
|
private String newAlly;
|
||||||
private EventReason reason;
|
private EventReason reason;
|
||||||
@ -24,6 +28,10 @@ public class McMMOPartyAllianceChangeEvent extends PlayerEvent implements Cancel
|
|||||||
this.cancelled = false;
|
this.cancelled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The party being left, or null if the player was not in a party
|
* @return The party being left, or null if the player was not in a party
|
||||||
*/
|
*/
|
||||||
@ -45,6 +53,24 @@ public class McMMOPartyAllianceChangeEvent extends PlayerEvent implements Cancel
|
|||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Following are required for Cancellable
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public boolean isCancelled() {
|
||||||
|
return cancelled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCancelled(boolean cancelled) {
|
||||||
|
this.cancelled = cancelled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of reasons why the event may have been fired
|
* A list of reasons why the event may have been fired
|
||||||
*/
|
*/
|
||||||
@ -64,27 +90,4 @@ public class McMMOPartyAllianceChangeEvent extends PlayerEvent implements Cancel
|
|||||||
*/
|
*/
|
||||||
CUSTOM;
|
CUSTOM;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Following are required for Cancellable **/
|
|
||||||
@Override
|
|
||||||
public boolean isCancelled() {
|
|
||||||
return cancelled;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCancelled(boolean cancelled) {
|
|
||||||
this.cancelled = cancelled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Rest of file is required boilerplate for custom events **/
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HandlerList getHandlers() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,10 @@ import org.bukkit.event.player.PlayerEvent;
|
|||||||
* Called when a player attempts to join, leave, or change parties.
|
* Called when a player attempts to join, leave, or change parties.
|
||||||
*/
|
*/
|
||||||
public class McMMOPartyChangeEvent extends PlayerEvent implements Cancellable {
|
public class McMMOPartyChangeEvent extends PlayerEvent implements Cancellable {
|
||||||
|
/**
|
||||||
|
* Rest of file is required boilerplate for custom events
|
||||||
|
**/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private String oldParty;
|
private String oldParty;
|
||||||
private String newParty;
|
private String newParty;
|
||||||
private EventReason reason;
|
private EventReason reason;
|
||||||
@ -27,6 +31,10 @@ public class McMMOPartyChangeEvent extends PlayerEvent implements Cancellable {
|
|||||||
this.cancelled = false;
|
this.cancelled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The party being left, or null if the player was not in a party
|
* @return The party being left, or null if the player was not in a party
|
||||||
*/
|
*/
|
||||||
@ -48,6 +56,24 @@ public class McMMOPartyChangeEvent extends PlayerEvent implements Cancellable {
|
|||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Following are required for Cancellable
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public boolean isCancelled() {
|
||||||
|
return cancelled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCancelled(boolean cancelled) {
|
||||||
|
this.cancelled = cancelled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of reasons why the event may have been fired
|
* A list of reasons why the event may have been fired
|
||||||
*/
|
*/
|
||||||
@ -77,27 +103,4 @@ public class McMMOPartyChangeEvent extends PlayerEvent implements Cancellable {
|
|||||||
*/
|
*/
|
||||||
CUSTOM;
|
CUSTOM;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Following are required for Cancellable **/
|
|
||||||
@Override
|
|
||||||
public boolean isCancelled() {
|
|
||||||
return cancelled;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCancelled(boolean cancelled) {
|
|
||||||
this.cancelled = cancelled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Rest of file is required boilerplate for custom events **/
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HandlerList getHandlers() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,10 @@ import org.bukkit.event.Event;
|
|||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
public class McMMOPartyLevelUpEvent extends Event implements Cancellable {
|
public class McMMOPartyLevelUpEvent extends Event implements Cancellable {
|
||||||
|
/**
|
||||||
|
* Rest of file is required boilerplate for custom events
|
||||||
|
**/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private Party party;
|
private Party party;
|
||||||
private int levelsChanged;
|
private int levelsChanged;
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
@ -16,6 +20,10 @@ public class McMMOPartyLevelUpEvent extends Event implements Cancellable {
|
|||||||
this.cancelled = false;
|
this.cancelled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
public Party getParty() {
|
public Party getParty() {
|
||||||
return party;
|
return party;
|
||||||
}
|
}
|
||||||
@ -28,7 +36,9 @@ public class McMMOPartyLevelUpEvent extends Event implements Cancellable {
|
|||||||
this.levelsChanged = levelsChanged;
|
this.levelsChanged = levelsChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Following are required for Cancellable **/
|
/**
|
||||||
|
* Following are required for Cancellable
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
return cancelled;
|
return cancelled;
|
||||||
@ -39,15 +49,8 @@ public class McMMOPartyLevelUpEvent extends Event implements Cancellable {
|
|||||||
this.cancelled = cancelled;
|
this.cancelled = cancelled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Rest of file is required boilerplate for custom events **/
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,10 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
|||||||
* Called just before a player teleports using the /ptp command.
|
* Called just before a player teleports using the /ptp command.
|
||||||
*/
|
*/
|
||||||
public class McMMOPartyTeleportEvent extends PlayerTeleportEvent {
|
public class McMMOPartyTeleportEvent extends PlayerTeleportEvent {
|
||||||
|
/**
|
||||||
|
* Rest of file is required boilerplate for custom events
|
||||||
|
**/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private String party;
|
private String party;
|
||||||
private Player target;
|
private Player target;
|
||||||
|
|
||||||
@ -17,6 +21,10 @@ public class McMMOPartyTeleportEvent extends PlayerTeleportEvent {
|
|||||||
this.target = target;
|
this.target = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The party the teleporting player is in
|
* @return The party the teleporting player is in
|
||||||
*/
|
*/
|
||||||
@ -31,15 +39,8 @@ public class McMMOPartyTeleportEvent extends PlayerTeleportEvent {
|
|||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Rest of file is required boilerplate for custom events **/
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,10 @@ import org.bukkit.event.Event;
|
|||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
public class McMMOPartyXpGainEvent extends Event implements Cancellable {
|
public class McMMOPartyXpGainEvent extends Event implements Cancellable {
|
||||||
|
/**
|
||||||
|
* Rest of file is required boilerplate for custom events
|
||||||
|
**/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private Party party;
|
private Party party;
|
||||||
private float xpGained;
|
private float xpGained;
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
@ -16,6 +20,10 @@ public class McMMOPartyXpGainEvent extends Event implements Cancellable {
|
|||||||
this.cancelled = false;
|
this.cancelled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
public Party getParty() {
|
public Party getParty() {
|
||||||
return party;
|
return party;
|
||||||
}
|
}
|
||||||
@ -27,6 +35,13 @@ public class McMMOPartyXpGainEvent extends Event implements Cancellable {
|
|||||||
return xpGained;
|
return xpGained;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param xpGained set amount of experience gained in this event
|
||||||
|
*/
|
||||||
|
public void setRawXpGained(float xpGained) {
|
||||||
|
this.xpGained = xpGained;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int amount of experience gained in this event
|
* @return int amount of experience gained in this event
|
||||||
*/
|
*/
|
||||||
@ -35,13 +50,6 @@ public class McMMOPartyXpGainEvent extends Event implements Cancellable {
|
|||||||
return (int) xpGained;
|
return (int) xpGained;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param xpGained set amount of experience gained in this event
|
|
||||||
*/
|
|
||||||
public void setRawXpGained(float xpGained) {
|
|
||||||
this.xpGained = xpGained;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param xpGained set int amount of experience gained in this event
|
* @param xpGained set int amount of experience gained in this event
|
||||||
*/
|
*/
|
||||||
@ -50,7 +58,9 @@ public class McMMOPartyXpGainEvent extends Event implements Cancellable {
|
|||||||
this.xpGained = xpGained;
|
this.xpGained = xpGained;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Following are required for Cancellable **/
|
/**
|
||||||
|
* Following are required for Cancellable
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
return cancelled;
|
return cancelled;
|
||||||
@ -61,15 +71,8 @@ public class McMMOPartyXpGainEvent extends Event implements Cancellable {
|
|||||||
this.cancelled = cancelled;
|
this.cancelled = cancelled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Rest of file is required boilerplate for custom events **/
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -11,24 +11,31 @@ import org.bukkit.scoreboard.Scoreboard;
|
|||||||
*/
|
*/
|
||||||
abstract public class McMMOScoreboardEvent extends Event {
|
abstract public class McMMOScoreboardEvent extends Event {
|
||||||
|
|
||||||
protected Scoreboard targetBoard; //Scoreboard involved in this event
|
/**
|
||||||
|
* Rest of file is required boilerplate for custom events
|
||||||
|
**/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
final Scoreboard currentBoard; //Can be null
|
final Scoreboard currentBoard; //Can be null
|
||||||
|
private final ScoreboardEventReason scoreboardEventReason;
|
||||||
|
protected Scoreboard targetBoard; //Scoreboard involved in this event
|
||||||
protected Player targetPlayer;
|
protected Player targetPlayer;
|
||||||
|
|
||||||
private final ScoreboardEventReason scoreboardEventReason;
|
/** GETTER & SETTER BOILERPLATE **/
|
||||||
|
|
||||||
public McMMOScoreboardEvent(Scoreboard targetBoard, Scoreboard currentBoard, Player targetPlayer, ScoreboardEventReason scoreboardEventReason)
|
public McMMOScoreboardEvent(Scoreboard targetBoard, Scoreboard currentBoard, Player targetPlayer, ScoreboardEventReason scoreboardEventReason) {
|
||||||
{
|
|
||||||
this.scoreboardEventReason = scoreboardEventReason;
|
this.scoreboardEventReason = scoreboardEventReason;
|
||||||
this.targetBoard = targetBoard;
|
this.targetBoard = targetBoard;
|
||||||
this.currentBoard = currentBoard;
|
this.currentBoard = currentBoard;
|
||||||
this.targetPlayer = targetPlayer;
|
this.targetPlayer = targetPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** GETTER & SETTER BOILERPLATE **/
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the scoreboard the player will be assigned to after this event
|
* This is the scoreboard the player will be assigned to after this event
|
||||||
|
*
|
||||||
* @return the target board to assign the player after this event fires
|
* @return the target board to assign the player after this event fires
|
||||||
*/
|
*/
|
||||||
public Scoreboard getTargetBoard() {
|
public Scoreboard getTargetBoard() {
|
||||||
@ -37,6 +44,7 @@ abstract public class McMMOScoreboardEvent extends Event {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the scoreboard that the player will be assigned to after this event fires
|
* Change the scoreboard that the player will be assigned to after this event fires
|
||||||
|
*
|
||||||
* @param targetBoard the new board to assign the player to
|
* @param targetBoard the new board to assign the player to
|
||||||
*/
|
*/
|
||||||
public void setTargetBoard(Scoreboard targetBoard) {
|
public void setTargetBoard(Scoreboard targetBoard) {
|
||||||
@ -45,15 +53,26 @@ abstract public class McMMOScoreboardEvent extends Event {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The player involved in this event (this can be changed)
|
* The player involved in this event (this can be changed)
|
||||||
|
*
|
||||||
* @return the player involved in this event
|
* @return the player involved in this event
|
||||||
*/
|
*/
|
||||||
public Player getTargetPlayer() {
|
public Player getTargetPlayer() {
|
||||||
return targetPlayer;
|
return targetPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change the target player for this event
|
||||||
|
*
|
||||||
|
* @param targetPlayer the new target for this event
|
||||||
|
*/
|
||||||
|
public void setTargetPlayer(Player targetPlayer) {
|
||||||
|
this.targetPlayer = targetPlayer;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the scoreboard the player is currently assigned to at the time the event was fired
|
* This is the scoreboard the player is currently assigned to at the time the event was fired
|
||||||
* Grabbed via player.getScoreboard()
|
* Grabbed via player.getScoreboard()
|
||||||
|
*
|
||||||
* @return players current scoreboard
|
* @return players current scoreboard
|
||||||
*/
|
*/
|
||||||
public Scoreboard getCurrentBoard() {
|
public Scoreboard getCurrentBoard() {
|
||||||
@ -62,29 +81,15 @@ abstract public class McMMOScoreboardEvent extends Event {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The ENUM defining the reason for this event
|
* The ENUM defining the reason for this event
|
||||||
|
*
|
||||||
* @return the reason for this event
|
* @return the reason for this event
|
||||||
*/
|
*/
|
||||||
public ScoreboardEventReason getScoreboardEventReason() {
|
public ScoreboardEventReason getScoreboardEventReason() {
|
||||||
return scoreboardEventReason;
|
return scoreboardEventReason;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Change the target player for this event
|
|
||||||
* @param targetPlayer the new target for this event
|
|
||||||
*/
|
|
||||||
public void setTargetPlayer(Player targetPlayer) {
|
|
||||||
this.targetPlayer = targetPlayer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Rest of file is required boilerplate for custom events **/
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,9 @@ import org.bukkit.scoreboard.Objective;
|
|||||||
import org.bukkit.scoreboard.Scoreboard;
|
import org.bukkit.scoreboard.Scoreboard;
|
||||||
|
|
||||||
public class McMMOScoreboardObjectiveEvent extends McMMOScoreboardEvent implements Cancellable {
|
public class McMMOScoreboardObjectiveEvent extends McMMOScoreboardEvent implements Cancellable {
|
||||||
protected boolean cancelled;
|
|
||||||
|
|
||||||
protected Objective targetObjective;
|
|
||||||
protected final ScoreboardObjectiveEventReason objectiveEventReason;
|
protected final ScoreboardObjectiveEventReason objectiveEventReason;
|
||||||
|
protected boolean cancelled;
|
||||||
|
protected Objective targetObjective;
|
||||||
|
|
||||||
public McMMOScoreboardObjectiveEvent(Objective targetObjective, ScoreboardObjectiveEventReason objectiveEventReason, Scoreboard scoreboard, Scoreboard oldboard, Player targetPlayer, ScoreboardEventReason scoreboardEventReason) {
|
public McMMOScoreboardObjectiveEvent(Objective targetObjective, ScoreboardObjectiveEventReason objectiveEventReason, Scoreboard scoreboard, Scoreboard oldboard, Player targetPlayer, ScoreboardEventReason scoreboardEventReason) {
|
||||||
super(scoreboard, oldboard, targetPlayer, scoreboardEventReason);
|
super(scoreboard, oldboard, targetPlayer, scoreboardEventReason);
|
||||||
@ -20,6 +19,7 @@ public class McMMOScoreboardObjectiveEvent extends McMMOScoreboardEvent implemen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The objective that will be modified by this event
|
* The objective that will be modified by this event
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Objective getTargetObjective() {
|
public Objective getTargetObjective() {
|
||||||
@ -28,6 +28,7 @@ public class McMMOScoreboardObjectiveEvent extends McMMOScoreboardEvent implemen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the target objective for this event
|
* Change the target objective for this event
|
||||||
|
*
|
||||||
* @param newObjective new target objective
|
* @param newObjective new target objective
|
||||||
*/
|
*/
|
||||||
public void setTargetObjective(Objective newObjective) {
|
public void setTargetObjective(Objective newObjective) {
|
||||||
|
@ -12,6 +12,10 @@ import org.bukkit.event.player.PlayerEvent;
|
|||||||
* This event is sent for when mcMMO informs a player about various important information
|
* This event is sent for when mcMMO informs a player about various important information
|
||||||
*/
|
*/
|
||||||
public class McMMOPlayerNotificationEvent extends PlayerEvent implements Cancellable {
|
public class McMMOPlayerNotificationEvent extends PlayerEvent implements Cancellable {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
protected final NotificationType notificationType;
|
||||||
|
protected ChatMessageType chatMessageType;
|
||||||
|
protected TextComponent notificationTextComponent;
|
||||||
private boolean isCancelled;
|
private boolean isCancelled;
|
||||||
/*
|
/*
|
||||||
* Messages can be sent to both places, as configured in advanced.yml
|
* Messages can be sent to both places, as configured in advanced.yml
|
||||||
@ -20,12 +24,6 @@ public class McMMOPlayerNotificationEvent extends PlayerEvent implements Cancell
|
|||||||
*/
|
*/
|
||||||
private boolean isMessageAlsoBeingSentToChat;
|
private boolean isMessageAlsoBeingSentToChat;
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
protected ChatMessageType chatMessageType;
|
|
||||||
|
|
||||||
protected TextComponent notificationTextComponent;
|
|
||||||
protected final NotificationType notificationType;
|
|
||||||
|
|
||||||
public McMMOPlayerNotificationEvent(Player who, NotificationType notificationType, TextComponent notificationTextComponent, ChatMessageType chatMessageType, boolean isMessageAlsoBeingSentToChat) {
|
public McMMOPlayerNotificationEvent(Player who, NotificationType notificationType, TextComponent notificationTextComponent, ChatMessageType chatMessageType, boolean isMessageAlsoBeingSentToChat) {
|
||||||
super(who);
|
super(who);
|
||||||
this.notificationType = notificationType;
|
this.notificationType = notificationType;
|
||||||
@ -39,6 +37,10 @@ public class McMMOPlayerNotificationEvent extends PlayerEvent implements Cancell
|
|||||||
* Getters & Setters
|
* Getters & Setters
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isMessageAlsoBeingSentToChat() {
|
public boolean isMessageAlsoBeingSentToChat() {
|
||||||
return isMessageAlsoBeingSentToChat;
|
return isMessageAlsoBeingSentToChat;
|
||||||
}
|
}
|
||||||
@ -63,27 +65,24 @@ public class McMMOPlayerNotificationEvent extends PlayerEvent implements Cancell
|
|||||||
this.chatMessageType = chatMessageType;
|
this.chatMessageType = chatMessageType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Custom Event Boilerplate
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The notification type for this event
|
* The notification type for this event
|
||||||
|
*
|
||||||
* @return this event's notification type
|
* @return this event's notification type
|
||||||
*/
|
*/
|
||||||
public NotificationType getEventNotificationType() {
|
public NotificationType getEventNotificationType() {
|
||||||
return notificationType;
|
return notificationType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Custom Event Boilerplate
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cancellable Interface Boilerplate
|
* Cancellable Interface Boilerplate
|
||||||
*/
|
*/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.nossr50.events.skills;
|
package com.gmail.nossr50.events.skills;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
import org.bukkit.event.player.PlayerEvent;
|
import org.bukkit.event.player.PlayerEvent;
|
||||||
@ -10,6 +10,10 @@ import org.bukkit.event.player.PlayerEvent;
|
|||||||
* Generic event for mcMMO skill handling.
|
* Generic event for mcMMO skill handling.
|
||||||
*/
|
*/
|
||||||
public abstract class McMMOPlayerSkillEvent extends PlayerEvent {
|
public abstract class McMMOPlayerSkillEvent extends PlayerEvent {
|
||||||
|
/**
|
||||||
|
* Rest of file is required boilerplate for custom events
|
||||||
|
**/
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
protected PrimarySkillType skill;
|
protected PrimarySkillType skill;
|
||||||
protected int skillLevel;
|
protected int skillLevel;
|
||||||
|
|
||||||
@ -19,6 +23,10 @@ public abstract class McMMOPlayerSkillEvent extends PlayerEvent {
|
|||||||
this.skillLevel = UserManager.getPlayer(player).getSkillLevel(skill);
|
this.skillLevel = UserManager.getPlayer(player).getSkillLevel(skill);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The skill involved in this event
|
* @return The skill involved in this event
|
||||||
*/
|
*/
|
||||||
@ -33,15 +41,8 @@ public abstract class McMMOPlayerSkillEvent extends PlayerEvent {
|
|||||||
return skillLevel;
|
return skillLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Rest of file is required boilerplate for custom events **/
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,9 @@ public class McMMOPlayerRepairCheckEvent extends McMMOPlayerSkillEvent implement
|
|||||||
return repairedObject;
|
return repairedObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Following are required for Cancellable **/
|
/**
|
||||||
|
* Following are required for Cancellable
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
return cancelled;
|
return cancelled;
|
||||||
|
@ -44,7 +44,9 @@ public class McMMOPlayerSalvageCheckEvent extends McMMOPlayerSkillEvent implemen
|
|||||||
return enchantedBook;
|
return enchantedBook;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Following are required for Cancellable **/
|
/**
|
||||||
|
* Following are required for Cancellable
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
return cancelled;
|
return cancelled;
|
||||||
|
@ -13,6 +13,7 @@ public class SubSkillEvent extends McMMOPlayerSkillEvent implements Cancellable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Only skills using the old system will fire this event
|
* Only skills using the old system will fire this event
|
||||||
|
*
|
||||||
* @param player target player
|
* @param player target player
|
||||||
* @param subSkillType target subskill
|
* @param subSkillType target subskill
|
||||||
* @Deprecated Skills will be using a new system stemming from the AbstractSubSkill class so make sure you check for both events, this event will be removed eventually.
|
* @Deprecated Skills will be using a new system stemming from the AbstractSubSkill class so make sure you check for both events, this event will be removed eventually.
|
||||||
@ -23,13 +24,13 @@ public class SubSkillEvent extends McMMOPlayerSkillEvent implements Cancellable
|
|||||||
this.subSkillType = subSkillType;
|
this.subSkillType = subSkillType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SubSkillEvent(Player player, AbstractSubSkill abstractSubSkill)
|
public SubSkillEvent(Player player, AbstractSubSkill abstractSubSkill) {
|
||||||
{
|
|
||||||
super(player, abstractSubSkill.getPrimarySkill());
|
super(player, abstractSubSkill.getPrimarySkill());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the SubSkillType involved in the event
|
* Gets the SubSkillType involved in the event
|
||||||
|
*
|
||||||
* @return the SubSkillType
|
* @return the SubSkillType
|
||||||
*/
|
*/
|
||||||
public SubSkillType getSubSkillType() {
|
public SubSkillType getSubSkillType() {
|
||||||
|
@ -12,8 +12,7 @@ public class SubSkillRandomCheckEvent extends SubSkillEvent {
|
|||||||
this.chance = chance;
|
this.chance = chance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SubSkillRandomCheckEvent(Player player, AbstractSubSkill abstractSubSkill, double chance)
|
public SubSkillRandomCheckEvent(Player player, AbstractSubSkill abstractSubSkill, double chance) {
|
||||||
{
|
|
||||||
super(player, abstractSubSkill);
|
super(player, abstractSubSkill);
|
||||||
this.chance = chance;
|
this.chance = chance;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,9 @@ public class McMMOPlayerDisarmEvent extends McMMOPlayerSkillEvent implements Can
|
|||||||
return defender;
|
return defender;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Following are required for Cancellable **/
|
/**
|
||||||
|
* Following are required for Cancellable
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
return cancelled;
|
return cancelled;
|
||||||
|
@ -1,34 +1,34 @@
|
|||||||
package com.gmail.nossr50.listeners;
|
package com.gmail.nossr50.listeners;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
import com.gmail.nossr50.core.config.skills.HiddenConfig;
|
import com.gmail.nossr50.core.config.skills.HiddenConfig;
|
||||||
import com.gmail.nossr50.core.config.skills.WorldBlacklist;
|
import com.gmail.nossr50.core.config.skills.WorldBlacklist;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SuperAbilityType;
|
import com.gmail.nossr50.core.skills.SuperAbilityType;
|
||||||
import com.gmail.nossr50.core.skills.ToolType;
|
import com.gmail.nossr50.core.skills.ToolType;
|
||||||
import com.gmail.nossr50.events.fake.FakeBlockBreakEvent;
|
import com.gmail.nossr50.core.skills.child.salvage.Salvage;
|
||||||
import com.gmail.nossr50.events.fake.FakeBlockDamageEvent;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.alchemy.Alchemy;
|
import com.gmail.nossr50.core.skills.primary.alchemy.Alchemy;
|
||||||
import com.gmail.nossr50.core.skills.primary.excavation.ExcavationManager;
|
import com.gmail.nossr50.core.skills.primary.excavation.ExcavationManager;
|
||||||
import com.gmail.nossr50.core.skills.primary.herbalism.Herbalism;
|
import com.gmail.nossr50.core.skills.primary.herbalism.Herbalism;
|
||||||
import com.gmail.nossr50.core.skills.primary.herbalism.HerbalismManager;
|
import com.gmail.nossr50.core.skills.primary.herbalism.HerbalismManager;
|
||||||
import com.gmail.nossr50.core.skills.primary.mining.MiningManager;
|
import com.gmail.nossr50.core.skills.primary.mining.MiningManager;
|
||||||
import com.gmail.nossr50.core.skills.primary.repair.Repair;
|
import com.gmail.nossr50.core.skills.primary.repair.Repair;
|
||||||
import com.gmail.nossr50.core.skills.child.salvage.Salvage;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.woodcutting.WoodcuttingManager;
|
import com.gmail.nossr50.core.skills.primary.woodcutting.WoodcuttingManager;
|
||||||
import com.gmail.nossr50.core.util.BlockUtils;
|
import com.gmail.nossr50.core.util.BlockUtils;
|
||||||
import com.gmail.nossr50.core.util.EventUtils;
|
import com.gmail.nossr50.core.util.EventUtils;
|
||||||
import com.gmail.nossr50.core.util.ItemUtils;
|
import com.gmail.nossr50.core.util.ItemUtils;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.SkillUtils;
|
import com.gmail.nossr50.core.util.skills.SkillUtils;
|
||||||
import com.gmail.nossr50.core.util.sounds.SoundManager;
|
import com.gmail.nossr50.core.util.sounds.SoundManager;
|
||||||
import com.gmail.nossr50.core.util.sounds.SoundType;
|
import com.gmail.nossr50.core.util.sounds.SoundType;
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardUtils;
|
import com.gmail.nossr50.core.worldguard.WorldGuardUtils;
|
||||||
|
import com.gmail.nossr50.events.fake.FakeBlockBreakEvent;
|
||||||
|
import com.gmail.nossr50.events.fake.FakeBlockDamageEvent;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -105,14 +105,12 @@ public class BlockListener implements Listener {
|
|||||||
* @param event The event to watch
|
* @param event The event to watch
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onEntityBlockFormEvent(EntityBlockFormEvent event)
|
public void onEntityBlockFormEvent(EntityBlockFormEvent event) {
|
||||||
{
|
|
||||||
/* WORLD BLACKLIST CHECK */
|
/* WORLD BLACKLIST CHECK */
|
||||||
if (WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld()))
|
if (WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(BlockUtils.shouldBeWatched(event.getBlock().getState()))
|
if (BlockUtils.shouldBeWatched(event.getBlock().getState())) {
|
||||||
{
|
|
||||||
mcMMO.getPlaceStore().setTrue(event.getBlock());
|
mcMMO.getPlaceStore().setTrue(event.getBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -178,8 +176,7 @@ public class BlockListener implements Listener {
|
|||||||
|
|
||||||
if (blockState.getType() == Repair.anvilMaterial && PrimarySkillType.REPAIR.getPermissions(player)) {
|
if (blockState.getType() == Repair.anvilMaterial && PrimarySkillType.REPAIR.getPermissions(player)) {
|
||||||
mcMMOPlayer.getRepairManager().placedAnvilCheck();
|
mcMMOPlayer.getRepairManager().placedAnvilCheck();
|
||||||
}
|
} else if (blockState.getType() == Salvage.anvilMaterial && PrimarySkillType.SALVAGE.getPermissions(player)) {
|
||||||
else if (blockState.getType() == Salvage.anvilMaterial && PrimarySkillType.SALVAGE.getPermissions(player)) {
|
|
||||||
mcMMOPlayer.getSalvageManager().placedAnvilCheck();
|
mcMMOPlayer.getSalvageManager().placedAnvilCheck();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,8 +198,7 @@ public class BlockListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (BlockState replacedBlockState : event.getReplacedBlockStates())
|
for (BlockState replacedBlockState : event.getReplacedBlockStates()) {
|
||||||
{
|
|
||||||
BlockState blockState = replacedBlockState.getBlock().getState();
|
BlockState blockState = replacedBlockState.getBlock().getState();
|
||||||
|
|
||||||
/* Check if the blocks placed should be monitored so they do not give out XP in the future */
|
/* Check if the blocks placed should be monitored so they do not give out XP in the future */
|
||||||
@ -213,8 +209,7 @@ public class BlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onBlockGrow(BlockGrowEvent event)
|
public void onBlockGrow(BlockGrowEvent event) {
|
||||||
{
|
|
||||||
/* WORLD BLACKLIST CHECK */
|
/* WORLD BLACKLIST CHECK */
|
||||||
if (WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld()))
|
if (WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld()))
|
||||||
return;
|
return;
|
||||||
@ -240,8 +235,7 @@ public class BlockListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(event.getPlayer()))
|
if (!WorldGuardManager.getInstance().hasMainFlag(event.getPlayer()))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -300,8 +294,7 @@ public class BlockListener implements Listener {
|
|||||||
WoodcuttingManager woodcuttingManager = mcMMOPlayer.getWoodcuttingManager();
|
WoodcuttingManager woodcuttingManager = mcMMOPlayer.getWoodcuttingManager();
|
||||||
if (woodcuttingManager.canUseTreeFeller(heldItem)) {
|
if (woodcuttingManager.canUseTreeFeller(heldItem)) {
|
||||||
woodcuttingManager.processTreeFeller(blockState);
|
woodcuttingManager.processTreeFeller(blockState);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
woodcuttingManager.woodcuttingBlockCheck(blockState);
|
woodcuttingManager.woodcuttingBlockCheck(blockState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -332,8 +325,7 @@ public class BlockListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(event.getPlayer()))
|
if (!WorldGuardManager.getInstance().hasMainFlag(event.getPlayer()))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -363,8 +355,7 @@ public class BlockListener implements Listener {
|
|||||||
if (herbalismManager.processHylianLuck(blockState)) {
|
if (herbalismManager.processHylianLuck(blockState)) {
|
||||||
blockState.update(true);
|
blockState.update(true);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
} else if (blockState.getType() == Material.FLOWER_POT) {
|
||||||
else if (blockState.getType() == Material.FLOWER_POT) {
|
|
||||||
blockState.setType(Material.AIR);
|
blockState.setType(Material.AIR);
|
||||||
blockState.update(true);
|
blockState.update(true);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
@ -398,8 +389,7 @@ public class BlockListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(event.getPlayer()))
|
if (!WorldGuardManager.getInstance().hasMainFlag(event.getPlayer()))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -423,17 +413,13 @@ public class BlockListener implements Listener {
|
|||||||
|
|
||||||
if (mcMMOPlayer.getToolPreparationMode(ToolType.HOE) && ItemUtils.isHoe(heldItem) && (BlockUtils.affectedByGreenTerra(blockState) || BlockUtils.canMakeMossy(blockState)) && Permissions.greenTerra(player)) {
|
if (mcMMOPlayer.getToolPreparationMode(ToolType.HOE) && ItemUtils.isHoe(heldItem) && (BlockUtils.affectedByGreenTerra(blockState) || BlockUtils.canMakeMossy(blockState)) && Permissions.greenTerra(player)) {
|
||||||
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.HERBALISM);
|
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.HERBALISM);
|
||||||
}
|
} else if (mcMMOPlayer.getToolPreparationMode(ToolType.AXE) && ItemUtils.isAxe(heldItem) && BlockUtils.isLog(blockState) && Permissions.treeFeller(player)) {
|
||||||
else if (mcMMOPlayer.getToolPreparationMode(ToolType.AXE) && ItemUtils.isAxe(heldItem) && BlockUtils.isLog(blockState) && Permissions.treeFeller(player)) {
|
|
||||||
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.WOODCUTTING);
|
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.WOODCUTTING);
|
||||||
}
|
} else if (mcMMOPlayer.getToolPreparationMode(ToolType.PICKAXE) && ItemUtils.isPickaxe(heldItem) && BlockUtils.affectedBySuperBreaker(blockState) && Permissions.superBreaker(player)) {
|
||||||
else if (mcMMOPlayer.getToolPreparationMode(ToolType.PICKAXE) && ItemUtils.isPickaxe(heldItem) && BlockUtils.affectedBySuperBreaker(blockState) && Permissions.superBreaker(player)) {
|
|
||||||
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.MINING);
|
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.MINING);
|
||||||
}
|
} else if (mcMMOPlayer.getToolPreparationMode(ToolType.SHOVEL) && ItemUtils.isShovel(heldItem) && BlockUtils.affectedByGigaDrillBreaker(blockState) && Permissions.gigaDrillBreaker(player)) {
|
||||||
else if (mcMMOPlayer.getToolPreparationMode(ToolType.SHOVEL) && ItemUtils.isShovel(heldItem) && BlockUtils.affectedByGigaDrillBreaker(blockState) && Permissions.gigaDrillBreaker(player)) {
|
|
||||||
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.EXCAVATION);
|
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.EXCAVATION);
|
||||||
}
|
} else if (mcMMOPlayer.getToolPreparationMode(ToolType.FISTS) && heldItem.getType() == Material.AIR && (BlockUtils.affectedByGigaDrillBreaker(blockState) || blockState.getType() == Material.SNOW || BlockUtils.affectedByBlockCracker(blockState) && Permissions.berserk(player))) {
|
||||||
else if (mcMMOPlayer.getToolPreparationMode(ToolType.FISTS) && heldItem.getType() == Material.AIR && (BlockUtils.affectedByGigaDrillBreaker(blockState) || blockState.getType() == Material.SNOW || BlockUtils.affectedByBlockCracker(blockState) && Permissions.berserk(player))) {
|
|
||||||
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.UNARMED);
|
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.UNARMED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -470,8 +456,7 @@ public class BlockListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(event.getPlayer()))
|
if (!WorldGuardManager.getInstance().hasMainFlag(event.getPlayer()))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -500,19 +485,16 @@ public class BlockListener implements Listener {
|
|||||||
if (mcMMOPlayer.getHerbalismManager().processGreenTerra(blockState)) {
|
if (mcMMOPlayer.getHerbalismManager().processGreenTerra(blockState)) {
|
||||||
blockState.update(true);
|
blockState.update(true);
|
||||||
}
|
}
|
||||||
}
|
} else if (mcMMOPlayer.getAbilityMode(SuperAbilityType.BERSERK) && heldItem.getType() == Material.AIR) {
|
||||||
else if (mcMMOPlayer.getAbilityMode(SuperAbilityType.BERSERK) && heldItem.getType() == Material.AIR) {
|
|
||||||
if (SuperAbilityType.BERSERK.blockCheck(block.getState()) && EventUtils.simulateBlockBreak(block, player, true)) {
|
if (SuperAbilityType.BERSERK.blockCheck(block.getState()) && EventUtils.simulateBlockBreak(block, player, true)) {
|
||||||
event.setInstaBreak(true);
|
event.setInstaBreak(true);
|
||||||
SoundManager.sendSound(player, block.getLocation(), SoundType.POP);
|
SoundManager.sendSound(player, block.getLocation(), SoundType.POP);
|
||||||
}
|
} else if (mcMMOPlayer.getUnarmedManager().canUseBlockCracker() && BlockUtils.affectedByBlockCracker(blockState) && EventUtils.simulateBlockBreak(block, player, true)) {
|
||||||
else if (mcMMOPlayer.getUnarmedManager().canUseBlockCracker() && BlockUtils.affectedByBlockCracker(blockState) && EventUtils.simulateBlockBreak(block, player, true)) {
|
|
||||||
if (mcMMOPlayer.getUnarmedManager().blockCrackerCheck(blockState)) {
|
if (mcMMOPlayer.getUnarmedManager().blockCrackerCheck(blockState)) {
|
||||||
blockState.update();
|
blockState.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else if (mcMMOPlayer.getWoodcuttingManager().canUseLeafBlower(heldItem) && BlockUtils.isLeaves(blockState) && EventUtils.simulateBlockBreak(block, player, true)) {
|
||||||
else if (mcMMOPlayer.getWoodcuttingManager().canUseLeafBlower(heldItem) && BlockUtils.isLeaves(blockState) && EventUtils.simulateBlockBreak(block, player, true)) {
|
|
||||||
event.setInstaBreak(true);
|
event.setInstaBreak(true);
|
||||||
SoundManager.sendSound(player, block.getLocation(), SoundType.POP);
|
SoundManager.sendSound(player, block.getLocation(), SoundType.POP);
|
||||||
}
|
}
|
||||||
@ -532,18 +514,15 @@ public class BlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void debugStickDump(Player player, BlockState blockState) {
|
public void debugStickDump(Player player, BlockState blockState) {
|
||||||
if(player.getInventory().getItemInMainHand().getType() == Material.DEBUG_STICK)
|
if (player.getInventory().getItemInMainHand().getType() == Material.DEBUG_STICK) {
|
||||||
{
|
|
||||||
if (mcMMO.getPlaceStore().isTrue(blockState))
|
if (mcMMO.getPlaceStore().isTrue(blockState))
|
||||||
player.sendMessage("[mcMMO DEBUG] This block is not natural and does not reward treasures/XP");
|
player.sendMessage("[mcMMO DEBUG] This block is not natural and does not reward treasures/XP");
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
player.sendMessage("[mcMMO DEBUG] This block is considered natural by mcMMO");
|
player.sendMessage("[mcMMO DEBUG] This block is considered natural by mcMMO");
|
||||||
UserManager.getPlayer(player).getExcavationManager().printExcavationDebug(player, blockState);
|
UserManager.getPlayer(player).getExcavationManager().printExcavationDebug(player, blockState);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (WorldGuardManager.getInstance().hasMainFlag(player))
|
if (WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
player.sendMessage("[mcMMO DEBUG] World Guard main flag is permitted for this player in this region");
|
player.sendMessage("[mcMMO DEBUG] World Guard main flag is permitted for this player in this region");
|
||||||
else
|
else
|
||||||
@ -555,19 +534,15 @@ public class BlockListener implements Listener {
|
|||||||
player.sendMessage("[mcMMO DEBUG] World Guard xp flag is not permitted for this player in this region");
|
player.sendMessage("[mcMMO DEBUG] World Guard xp flag is not permitted for this player in this region");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(blockState instanceof Furnace)
|
if (blockState instanceof Furnace) {
|
||||||
{
|
|
||||||
Furnace furnace = (Furnace) blockState;
|
Furnace furnace = (Furnace) blockState;
|
||||||
if(furnace.hasMetadata(mcMMO.furnaceMetadataKey))
|
if (furnace.hasMetadata(mcMMO.furnaceMetadataKey)) {
|
||||||
{
|
|
||||||
player.sendMessage("[mcMMO DEBUG] This furnace has a registered owner");
|
player.sendMessage("[mcMMO DEBUG] This furnace has a registered owner");
|
||||||
Player furnacePlayer = getPlayerFromFurnace(furnace.getBlock());
|
Player furnacePlayer = getPlayerFromFurnace(furnace.getBlock());
|
||||||
if(furnacePlayer != null)
|
if (furnacePlayer != null) {
|
||||||
{
|
|
||||||
player.sendMessage("[mcMMO DEBUG] This furnace is owned by player " + furnacePlayer.getName());
|
player.sendMessage("[mcMMO DEBUG] This furnace is owned by player " + furnacePlayer.getName());
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
player.sendMessage("[mcMMO DEBUG] This furnace does not have a registered owner");
|
player.sendMessage("[mcMMO DEBUG] This furnace does not have a registered owner");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
package com.gmail.nossr50.listeners;
|
package com.gmail.nossr50.listeners;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.core.config.skills.AdvancedConfig;
|
import com.gmail.nossr50.core.config.skills.AdvancedConfig;
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
import com.gmail.nossr50.core.config.skills.WorldBlacklist;
|
import com.gmail.nossr50.core.config.skills.WorldBlacklist;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.meta.OldName;
|
import com.gmail.nossr50.core.datatypes.meta.OldName;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
|
||||||
import com.gmail.nossr50.core.skills.subskills.interfaces.InteractType;
|
|
||||||
import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent;
|
|
||||||
import com.gmail.nossr50.events.fake.FakeEntityDamageEvent;
|
|
||||||
import com.gmail.nossr50.events.fake.FakeEntityTameEvent;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.core.skills.primary.archery.Archery;
|
import com.gmail.nossr50.core.skills.primary.archery.Archery;
|
||||||
import com.gmail.nossr50.core.skills.primary.fishing.Fishing;
|
import com.gmail.nossr50.core.skills.primary.fishing.Fishing;
|
||||||
import com.gmail.nossr50.core.skills.primary.mining.BlastMining;
|
import com.gmail.nossr50.core.skills.primary.mining.BlastMining;
|
||||||
import com.gmail.nossr50.core.skills.primary.mining.MiningManager;
|
import com.gmail.nossr50.core.skills.primary.mining.MiningManager;
|
||||||
import com.gmail.nossr50.core.skills.primary.taming.Taming;
|
import com.gmail.nossr50.core.skills.primary.taming.Taming;
|
||||||
import com.gmail.nossr50.core.skills.primary.taming.TamingManager;
|
import com.gmail.nossr50.core.skills.primary.taming.TamingManager;
|
||||||
|
import com.gmail.nossr50.core.skills.subskills.interfaces.InteractType;
|
||||||
import com.gmail.nossr50.core.util.BlockUtils;
|
import com.gmail.nossr50.core.util.BlockUtils;
|
||||||
import com.gmail.nossr50.core.util.Misc;
|
import com.gmail.nossr50.core.util.Misc;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.CombatUtils;
|
import com.gmail.nossr50.core.util.skills.CombatUtils;
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardUtils;
|
import com.gmail.nossr50.core.worldguard.WorldGuardUtils;
|
||||||
|
import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent;
|
||||||
|
import com.gmail.nossr50.events.fake.FakeEntityDamageEvent;
|
||||||
|
import com.gmail.nossr50.events.fake.FakeEntityTameEvent;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
@ -55,14 +55,12 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onEntityTargetEntity(EntityTargetLivingEntityEvent event)
|
public void onEntityTargetEntity(EntityTargetLivingEntityEvent event) {
|
||||||
{
|
|
||||||
if (!ExperienceConfig.getInstance().isEndermanEndermiteFarmingPrevented())
|
if (!ExperienceConfig.getInstance().isEndermanEndermiteFarmingPrevented())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//Prevent entities from giving XP if they target endermite
|
//Prevent entities from giving XP if they target endermite
|
||||||
if(event.getTarget() instanceof Endermite)
|
if (event.getTarget() instanceof Endermite) {
|
||||||
{
|
|
||||||
if (event.getEntity().getMetadata(mcMMO.entityMetadataKey) == null || event.getEntity().getMetadata(mcMMO.entityMetadataKey).size() <= 0)
|
if (event.getEntity().getMetadata(mcMMO.entityMetadataKey) == null || event.getEntity().getMetadata(mcMMO.entityMetadataKey).size() <= 0)
|
||||||
event.getEntity().setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
|
event.getEntity().setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
|
||||||
}
|
}
|
||||||
@ -74,13 +72,11 @@ public class EntityListener implements Listener {
|
|||||||
if (WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld()))
|
if (WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(event.getEntity() instanceof Player)
|
if (event.getEntity() instanceof Player) {
|
||||||
{
|
|
||||||
Player player = (Player) event.getEntity();
|
Player player = (Player) event.getEntity();
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -108,13 +104,11 @@ public class EntityListener implements Listener {
|
|||||||
if (WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld()))
|
if (WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(event.getEntity() instanceof Player)
|
if (event.getEntity() instanceof Player) {
|
||||||
{
|
|
||||||
Player player = (Player) event.getEntity();
|
Player player = (Player) event.getEntity();
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -133,8 +127,7 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Monitor EntityChangeBlock events.
|
* Monitor EntityChangeBlock events.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to watch
|
||||||
* The event to watch
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onEntityChangeBlock(EntityChangeBlockEvent event) {
|
public void onEntityChangeBlock(EntityChangeBlockEvent event) {
|
||||||
@ -159,14 +152,12 @@ public class EntityListener implements Listener {
|
|||||||
if (mcMMO.getPlaceStore().isTrue(block) && !isTracked) {
|
if (mcMMO.getPlaceStore().isTrue(block) && !isTracked) {
|
||||||
mcMMO.getPlaceStore().setFalse(block);
|
mcMMO.getPlaceStore().setFalse(block);
|
||||||
entity.setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
|
entity.setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
|
||||||
}
|
} else if (isTracked) {
|
||||||
else if (isTracked) {
|
|
||||||
mcMMO.getPlaceStore().setTrue(block);
|
mcMMO.getPlaceStore().setTrue(block);
|
||||||
}
|
}
|
||||||
} else if ((block.getType() == Material.REDSTONE_ORE)) {
|
} else if ((block.getType() == Material.REDSTONE_ORE)) {
|
||||||
return;
|
return;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (mcMMO.getPlaceStore().isTrue(block)) {
|
if (mcMMO.getPlaceStore().isTrue(block)) {
|
||||||
mcMMO.getPlaceStore().setFalse(block);
|
mcMMO.getPlaceStore().setFalse(block);
|
||||||
}
|
}
|
||||||
@ -176,8 +167,7 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Handle EntityDamageByEntity events that involve modifying the event.
|
* Handle EntityDamageByEntity events that involve modifying the event.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to watch
|
||||||
* The event to watch
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
|
public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
|
||||||
@ -193,8 +183,7 @@ public class EntityListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getDamager().hasMetadata(mcMMO.funfettiMetadataKey))
|
if (event.getDamager().hasMetadata(mcMMO.funfettiMetadataKey)) {
|
||||||
{
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -203,13 +192,11 @@ public class EntityListener implements Listener {
|
|||||||
Entity defender = event.getEntity();
|
Entity defender = event.getEntity();
|
||||||
Entity attacker = event.getDamager();
|
Entity attacker = event.getDamager();
|
||||||
|
|
||||||
if(attacker instanceof Player)
|
if (attacker instanceof Player) {
|
||||||
{
|
|
||||||
Player player = (Player) attacker;
|
Player player = (Player) attacker;
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -252,7 +239,6 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (Misc.isNPCEntity(attacker)) {
|
if (Misc.isNPCEntity(attacker)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -263,15 +249,13 @@ public class EntityListener implements Listener {
|
|||||||
if (projectileSource instanceof LivingEntity) {
|
if (projectileSource instanceof LivingEntity) {
|
||||||
attacker = (LivingEntity) projectileSource;
|
attacker = (LivingEntity) projectileSource;
|
||||||
}
|
}
|
||||||
}
|
} else if (attacker instanceof Tameable) {
|
||||||
else if (attacker instanceof Tameable) {
|
|
||||||
AnimalTamer animalTamer = ((Tameable) attacker).getOwner();
|
AnimalTamer animalTamer = ((Tameable) attacker).getOwner();
|
||||||
|
|
||||||
if (animalTamer != null && ((OfflinePlayer) animalTamer).isOnline()) {
|
if (animalTamer != null && ((OfflinePlayer) animalTamer).isOnline()) {
|
||||||
attacker = (Entity) animalTamer;
|
attacker = (Entity) animalTamer;
|
||||||
}
|
}
|
||||||
}
|
} else if (attacker instanceof TNTPrimed && defender instanceof Player) {
|
||||||
else if (attacker instanceof TNTPrimed && defender instanceof Player) {
|
|
||||||
if (BlastMining.processBlastMiningExplosion(event, (TNTPrimed) attacker, (Player) defender)) {
|
if (BlastMining.processBlastMiningExplosion(event, (TNTPrimed) attacker, (Player) defender)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -305,17 +289,14 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* This sets entity names back to whatever they are supposed to be
|
* This sets entity names back to whatever they are supposed to be
|
||||||
*/
|
*/
|
||||||
if(!(attacker instanceof Player) && defender instanceof Player)
|
if (!(attacker instanceof Player) && defender instanceof Player) {
|
||||||
{
|
if (event.getFinalDamage() >= ((LivingEntity) defender).getHealth()) {
|
||||||
if(event.getFinalDamage() >= ((LivingEntity) defender).getHealth())
|
|
||||||
{
|
|
||||||
List<MetadataValue> metadataValue = attacker.getMetadata("mcMMO_oldName");
|
List<MetadataValue> metadataValue = attacker.getMetadata("mcMMO_oldName");
|
||||||
|
|
||||||
if (metadataValue.size() <= 0)
|
if (metadataValue.size() <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(metadataValue != null)
|
if (metadataValue != null) {
|
||||||
{
|
|
||||||
OldName oldName = (OldName) metadataValue.get(0);
|
OldName oldName = (OldName) metadataValue.get(0);
|
||||||
attacker.setCustomName(oldName.asString());
|
attacker.setCustomName(oldName.asString());
|
||||||
attacker.setCustomNameVisible(false);
|
attacker.setCustomNameVisible(false);
|
||||||
@ -327,8 +308,7 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Handle EntityDamage events that involve modifying the event.
|
* Handle EntityDamage events that involve modifying the event.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to modify
|
||||||
* The event to modify
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onEntityDamage(EntityDamageEvent event) {
|
public void onEntityDamage(EntityDamageEvent event) {
|
||||||
@ -336,12 +316,10 @@ public class EntityListener implements Listener {
|
|||||||
if (WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld()))
|
if (WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(event.getEntity() instanceof Player)
|
if (event.getEntity() instanceof Player) {
|
||||||
{
|
|
||||||
Player player = (Player) event.getEntity();
|
Player player = (Player) event.getEntity();
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -408,18 +386,14 @@ public class EntityListener implements Listener {
|
|||||||
mcMMOPlayer.actualizeRecentlyHurt();
|
mcMMOPlayer.actualizeRecentlyHurt();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} else if (livingEntity instanceof Tameable) {
|
||||||
|
|
||||||
else if (livingEntity instanceof Tameable) {
|
|
||||||
Tameable pet = (Tameable) livingEntity;
|
Tameable pet = (Tameable) livingEntity;
|
||||||
AnimalTamer owner = pet.getOwner();
|
AnimalTamer owner = pet.getOwner();
|
||||||
|
|
||||||
if(owner instanceof Player)
|
if (owner instanceof Player) {
|
||||||
{
|
|
||||||
Player player = (Player) owner;
|
Player player = (Player) owner;
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -493,8 +467,7 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Monitor EntityDeath events.
|
* Monitor EntityDeath events.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to watch
|
||||||
* The event to watch
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onEntityDeathLowest(EntityDeathEvent event) {
|
public void onEntityDeathLowest(EntityDeathEvent event) {
|
||||||
@ -526,8 +499,7 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Monitor EntityDeath events.
|
* Monitor EntityDeath events.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to watch
|
||||||
* The event to watch
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void onEntityDeath(EntityDeathEvent event) {
|
public void onEntityDeath(EntityDeathEvent event) {
|
||||||
@ -547,8 +519,7 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Monitor CreatureSpawn events.
|
* Monitor CreatureSpawn events.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to watch
|
||||||
* The event to watch
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onCreatureSpawn(CreatureSpawnEvent event) {
|
public void onCreatureSpawn(CreatureSpawnEvent event) {
|
||||||
@ -583,8 +554,7 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Handle ExplosionPrime events that involve modifying the event.
|
* Handle ExplosionPrime events that involve modifying the event.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to modify
|
||||||
* The event to modify
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onExplosionPrime(ExplosionPrimeEvent event) {
|
public void onExplosionPrime(ExplosionPrimeEvent event) {
|
||||||
@ -607,8 +577,7 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -623,8 +592,7 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Handle EntityExplode events that involve modifying the event.
|
* Handle EntityExplode events that involve modifying the event.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to modify
|
||||||
* The event to modify
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onEnitityExplode(EntityExplodeEvent event) {
|
public void onEnitityExplode(EntityExplodeEvent event) {
|
||||||
@ -647,8 +615,7 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -664,8 +631,7 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Handle EntityExplode events that involve modifying the event.
|
* Handle EntityExplode events that involve modifying the event.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to modify
|
||||||
* The event to modify
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public void onEntityExplodeMonitor(EntityExplodeEvent event) {
|
public void onEntityExplodeMonitor(EntityExplodeEvent event) {
|
||||||
@ -685,8 +651,7 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Handle FoodLevelChange events that involve modifying the event.
|
* Handle FoodLevelChange events that involve modifying the event.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to modify
|
||||||
* The event to modify
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||||
public void onFoodLevelChange(FoodLevelChangeEvent event) {
|
public void onFoodLevelChange(FoodLevelChangeEvent event) {
|
||||||
@ -703,8 +668,7 @@ public class EntityListener implements Listener {
|
|||||||
Player player = (Player) entity;
|
Player player = (Player) entity;
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -789,8 +753,7 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Monitor EntityTame events.
|
* Monitor EntityTame events.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to watch
|
||||||
* The event to watch
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onEntityTame(EntityTameEvent event) {
|
public void onEntityTame(EntityTameEvent event) {
|
||||||
@ -805,8 +768,7 @@ public class EntityListener implements Listener {
|
|||||||
Player player = (Player) event.getOwner();
|
Player player = (Player) event.getOwner();
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -824,8 +786,7 @@ public class EntityListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Handle EntityTarget events.
|
* Handle EntityTarget events.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to process
|
||||||
* The event to process
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onEntityTarget(EntityTargetEvent event) {
|
public void onEntityTarget(EntityTargetEvent event) {
|
||||||
@ -843,8 +804,7 @@ public class EntityListener implements Listener {
|
|||||||
Player player = (Player) target;
|
Player player = (Player) target;
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -867,8 +827,7 @@ public class EntityListener implements Listener {
|
|||||||
* Handle PotionSplash events in order to fix broken Splash Potion of
|
* Handle PotionSplash events in order to fix broken Splash Potion of
|
||||||
* Saturation.
|
* Saturation.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event The event to process
|
||||||
* The event to process
|
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onPotionSplash(PotionSplashEvent event) {
|
public void onPotionSplash(PotionSplashEvent event) {
|
||||||
|
@ -17,10 +17,10 @@ public class InteractionManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers subskills with the Interaction registration
|
* Registers subskills with the Interaction registration
|
||||||
|
*
|
||||||
* @param abstractSubSkill the target subskill to register
|
* @param abstractSubSkill the target subskill to register
|
||||||
*/
|
*/
|
||||||
public static void registerSubSkill(AbstractSubSkill abstractSubSkill)
|
public static void registerSubSkill(AbstractSubSkill abstractSubSkill) {
|
||||||
{
|
|
||||||
/* INIT MAPS */
|
/* INIT MAPS */
|
||||||
if (interactRegister == null)
|
if (interactRegister == null)
|
||||||
interactRegister = new HashMap<>();
|
interactRegister = new HashMap<>();
|
||||||
@ -57,24 +57,23 @@ public class InteractionManager {
|
|||||||
/**
|
/**
|
||||||
* Grabs the registered abstract skill by its name
|
* Grabs the registered abstract skill by its name
|
||||||
* Is not case sensitive
|
* Is not case sensitive
|
||||||
|
*
|
||||||
* @param name name of subskill, not case sensitive
|
* @param name name of subskill, not case sensitive
|
||||||
* @return null if the subskill is not registered
|
* @return null if the subskill is not registered
|
||||||
*/
|
*/
|
||||||
public static AbstractSubSkill getAbstractByName(String name)
|
public static AbstractSubSkill getAbstractByName(String name) {
|
||||||
{
|
|
||||||
return subSkillNameMap.get(name.toLowerCase());
|
return subSkillNameMap.get(name.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Processes the associated Interactions for this event
|
* Processes the associated Interactions for this event
|
||||||
|
*
|
||||||
* @param event target event
|
* @param event target event
|
||||||
* @param plugin instance of mcMMO plugin
|
* @param plugin instance of mcMMO plugin
|
||||||
* @param curInteractType the associated interaction type
|
* @param curInteractType the associated interaction type
|
||||||
*/
|
*/
|
||||||
public static void processEvent(Event event, mcMMO plugin, InteractType curInteractType)
|
public static void processEvent(Event event, mcMMO plugin, InteractType curInteractType) {
|
||||||
{
|
for (Interaction interaction : interactRegister.get(curInteractType)) {
|
||||||
for(Interaction interaction : interactRegister.get(curInteractType))
|
|
||||||
{
|
|
||||||
interaction.doInteraction(event, plugin);
|
interaction.doInteraction(event, plugin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -82,25 +81,24 @@ public class InteractionManager {
|
|||||||
/**
|
/**
|
||||||
* Returns the list that contains all unique instances of registered Interaction classes
|
* Returns the list that contains all unique instances of registered Interaction classes
|
||||||
* Interactions are extensions of abstract classes that represent modifying behaviours in Minecraft through events
|
* Interactions are extensions of abstract classes that represent modifying behaviours in Minecraft through events
|
||||||
|
*
|
||||||
* @return the unique collection of all registered Interaction classes
|
* @return the unique collection of all registered Interaction classes
|
||||||
*/
|
*/
|
||||||
public static ArrayList<AbstractSubSkill> getSubSkillList()
|
public static ArrayList<AbstractSubSkill> getSubSkillList() {
|
||||||
{
|
|
||||||
return subSkillList;
|
return subSkillList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasSubSkill(String name)
|
public static boolean hasSubSkill(String name) {
|
||||||
{
|
|
||||||
return getAbstractByName(name) != null;
|
return getAbstractByName(name) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasSubSkill(SubSkillType subSkillType)
|
public static boolean hasSubSkill(SubSkillType subSkillType) {
|
||||||
{
|
|
||||||
return hasSubSkill(subSkillType.getNiceNameNoSpaces(subSkillType));
|
return hasSubSkill(subSkillType.getNiceNameNoSpaces(subSkillType));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the associative map which contains all registered interactions
|
* Returns the associative map which contains all registered interactions
|
||||||
|
*
|
||||||
* @return the interact register
|
* @return the interact register
|
||||||
*/
|
*/
|
||||||
public static HashMap<InteractType, ArrayList<Interaction>> getInteractRegister() {
|
public static HashMap<InteractType, ArrayList<Interaction>> getInteractRegister() {
|
||||||
|
@ -2,19 +2,19 @@ package com.gmail.nossr50.listeners;
|
|||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
import com.gmail.nossr50.core.config.skills.WorldBlacklist;
|
import com.gmail.nossr50.core.config.skills.WorldBlacklist;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.runnables.player.PlayerUpdateInventoryTask;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.SubSkillType;
|
import com.gmail.nossr50.core.skills.SubSkillType;
|
||||||
import com.gmail.nossr50.events.fake.FakeBrewEvent;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.runnables.player.PlayerUpdateInventoryTask;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.alchemy.Alchemy;
|
import com.gmail.nossr50.core.skills.primary.alchemy.Alchemy;
|
||||||
import com.gmail.nossr50.core.skills.primary.alchemy.AlchemyPotionBrewer;
|
import com.gmail.nossr50.core.skills.primary.alchemy.AlchemyPotionBrewer;
|
||||||
import com.gmail.nossr50.core.util.ItemUtils;
|
import com.gmail.nossr50.core.util.ItemUtils;
|
||||||
import com.gmail.nossr50.core.util.Permissions;
|
import com.gmail.nossr50.core.util.Permissions;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.SkillUtils;
|
import com.gmail.nossr50.core.util.skills.SkillUtils;
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardUtils;
|
import com.gmail.nossr50.core.worldguard.WorldGuardUtils;
|
||||||
|
import com.gmail.nossr50.events.fake.FakeBrewEvent;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
@ -99,8 +99,7 @@ public class InventoryListener implements Listener {
|
|||||||
Player player = getPlayerFromFurnace(furnaceBlock);
|
Player player = getPlayerFromFurnace(furnaceBlock);
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -128,8 +127,7 @@ public class InventoryListener implements Listener {
|
|||||||
Player player = getPlayerFromFurnace(furnaceBlock);
|
Player player = getPlayerFromFurnace(furnaceBlock);
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -156,8 +154,7 @@ public class InventoryListener implements Listener {
|
|||||||
Player player = getPlayerFromFurnace(furnaceBlock);
|
Player player = getPlayerFromFurnace(furnaceBlock);
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -178,13 +175,11 @@ public class InventoryListener implements Listener {
|
|||||||
|
|
||||||
Inventory inventory = event.getInventory();
|
Inventory inventory = event.getInventory();
|
||||||
|
|
||||||
if(event.getWhoClicked() instanceof Player)
|
if (event.getWhoClicked() instanceof Player) {
|
||||||
{
|
|
||||||
Player player = ((Player) event.getWhoClicked()).getPlayer();
|
Player player = ((Player) event.getWhoClicked()).getPlayer();
|
||||||
Block furnaceBlock = processInventoryOpenOrCloseEvent(event.getInventory());
|
Block furnaceBlock = processInventoryOpenOrCloseEvent(event.getInventory());
|
||||||
|
|
||||||
if (furnaceBlock != null)
|
if (furnaceBlock != null) {
|
||||||
{
|
|
||||||
if (furnaceBlock.getMetadata(mcMMO.furnaceMetadataKey).size() > 0)
|
if (furnaceBlock.getMetadata(mcMMO.furnaceMetadataKey).size() > 0)
|
||||||
furnaceBlock.removeMetadata(mcMMO.furnaceMetadataKey, mcMMO.p);
|
furnaceBlock.removeMetadata(mcMMO.furnaceMetadataKey, mcMMO.p);
|
||||||
|
|
||||||
@ -211,8 +206,7 @@ public class InventoryListener implements Listener {
|
|||||||
Player player = (Player) whoClicked;
|
Player player = (Player) whoClicked;
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -251,8 +245,7 @@ public class InventoryListener implements Listener {
|
|||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
} else if (slot == InventoryType.SlotType.FUEL) {
|
||||||
else if (slot == InventoryType.SlotType.FUEL) {
|
|
||||||
boolean emptyClicked = AlchemyPotionBrewer.isEmpty(clicked);
|
boolean emptyClicked = AlchemyPotionBrewer.isEmpty(clicked);
|
||||||
|
|
||||||
if (AlchemyPotionBrewer.isEmpty(cursor)) {
|
if (AlchemyPotionBrewer.isEmpty(cursor)) {
|
||||||
@ -262,8 +255,7 @@ public class InventoryListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
AlchemyPotionBrewer.scheduleCheck(player, stand);
|
AlchemyPotionBrewer.scheduleCheck(player, stand);
|
||||||
}
|
} else if (emptyClicked) {
|
||||||
else if (emptyClicked) {
|
|
||||||
if (AlchemyPotionBrewer.isValidIngredient(player, cursor)) {
|
if (AlchemyPotionBrewer.isValidIngredient(player, cursor)) {
|
||||||
int amount = cursor.getAmount();
|
int amount = cursor.getAmount();
|
||||||
|
|
||||||
@ -274,8 +266,7 @@ public class InventoryListener implements Listener {
|
|||||||
|
|
||||||
AlchemyPotionBrewer.scheduleUpdate(inventory);
|
AlchemyPotionBrewer.scheduleUpdate(inventory);
|
||||||
AlchemyPotionBrewer.scheduleCheck(player, stand);
|
AlchemyPotionBrewer.scheduleCheck(player, stand);
|
||||||
}
|
} else if (click == ClickType.RIGHT) {
|
||||||
else if (click == ClickType.RIGHT) {
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
|
||||||
ItemStack one = cursor.clone();
|
ItemStack one = cursor.clone();
|
||||||
@ -330,8 +321,7 @@ public class InventoryListener implements Listener {
|
|||||||
Player player = (Player) whoClicked;
|
Player player = (Player) whoClicked;
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -349,8 +339,7 @@ public class InventoryListener implements Listener {
|
|||||||
|
|
||||||
// Apparently sometimes vanilla brewing beats our task listener to the actual brew. We handle this by cancelling the vanilla event and finishing our brew ourselves.
|
// Apparently sometimes vanilla brewing beats our task listener to the actual brew. We handle this by cancelling the vanilla event and finishing our brew ourselves.
|
||||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public void onBrew(BrewEvent event)
|
public void onBrew(BrewEvent event) {
|
||||||
{
|
|
||||||
/* WORLD BLACKLIST CHECK */
|
/* WORLD BLACKLIST CHECK */
|
||||||
if (WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld()))
|
if (WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld()))
|
||||||
return;
|
return;
|
||||||
@ -433,8 +422,7 @@ public class InventoryListener implements Listener {
|
|||||||
Player player = (Player) whoClicked;
|
Player player = (Player) whoClicked;
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1,35 +1,35 @@
|
|||||||
package com.gmail.nossr50.listeners;
|
package com.gmail.nossr50.listeners;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.core.chat.ChatManager;
|
import com.gmail.nossr50.core.chat.ChatManager;
|
||||||
import com.gmail.nossr50.core.chat.ChatManagerFactory;
|
import com.gmail.nossr50.core.chat.ChatManagerFactory;
|
||||||
import com.gmail.nossr50.core.chat.PartyChatManager;
|
import com.gmail.nossr50.core.chat.PartyChatManager;
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
import com.gmail.nossr50.core.config.skills.WorldBlacklist;
|
import com.gmail.nossr50.core.config.skills.WorldBlacklist;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.chat.ChatMode;
|
import com.gmail.nossr50.core.datatypes.chat.ChatMode;
|
||||||
import com.gmail.nossr50.core.datatypes.party.Party;
|
import com.gmail.nossr50.core.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.locale.LocaleLoader;
|
import com.gmail.nossr50.core.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.core.util.*;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.party.ShareHandler;
|
import com.gmail.nossr50.core.party.ShareHandler;
|
||||||
import com.gmail.nossr50.core.runnables.player.PlayerProfileLoadingTask;
|
import com.gmail.nossr50.core.runnables.player.PlayerProfileLoadingTask;
|
||||||
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
|
import com.gmail.nossr50.core.skills.child.salvage.Salvage;
|
||||||
|
import com.gmail.nossr50.core.skills.child.salvage.SalvageManager;
|
||||||
import com.gmail.nossr50.core.skills.primary.fishing.FishingManager;
|
import com.gmail.nossr50.core.skills.primary.fishing.FishingManager;
|
||||||
import com.gmail.nossr50.core.skills.primary.herbalism.HerbalismManager;
|
import com.gmail.nossr50.core.skills.primary.herbalism.HerbalismManager;
|
||||||
import com.gmail.nossr50.core.skills.primary.mining.MiningManager;
|
import com.gmail.nossr50.core.skills.primary.mining.MiningManager;
|
||||||
import com.gmail.nossr50.core.skills.primary.repair.Repair;
|
import com.gmail.nossr50.core.skills.primary.repair.Repair;
|
||||||
import com.gmail.nossr50.core.skills.primary.repair.RepairManager;
|
import com.gmail.nossr50.core.skills.primary.repair.RepairManager;
|
||||||
import com.gmail.nossr50.core.skills.child.salvage.Salvage;
|
|
||||||
import com.gmail.nossr50.core.skills.child.salvage.SalvageManager;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.taming.TamingManager;
|
import com.gmail.nossr50.core.skills.primary.taming.TamingManager;
|
||||||
import com.gmail.nossr50.util.*;
|
import com.gmail.nossr50.core.util.*;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.skills.SkillUtils;
|
import com.gmail.nossr50.core.util.skills.SkillUtils;
|
||||||
import com.gmail.nossr50.core.util.sounds.SoundManager;
|
import com.gmail.nossr50.core.util.sounds.SoundManager;
|
||||||
import com.gmail.nossr50.core.util.sounds.SoundType;
|
import com.gmail.nossr50.core.util.sounds.SoundType;
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardUtils;
|
import com.gmail.nossr50.core.worldguard.WorldGuardUtils;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.util.*;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
@ -69,8 +69,7 @@ public class PlayerListener implements Listener {
|
|||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -100,8 +99,7 @@ public class PlayerListener implements Listener {
|
|||||||
String deathMessage = event.getDeathMessage();
|
String deathMessage = event.getDeathMessage();
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(event.getEntity()))
|
if (!WorldGuardManager.getInstance().hasMainFlag(event.getEntity()))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -146,8 +144,7 @@ public class PlayerListener implements Listener {
|
|||||||
Player killer = killedPlayer.getKiller();
|
Player killer = killedPlayer.getKiller();
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(killedPlayer))
|
if (!WorldGuardManager.getInstance().hasMainFlag(killedPlayer))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -206,8 +203,7 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(event.getPlayer()))
|
if (!WorldGuardManager.getInstance().hasMainFlag(event.getPlayer()))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -239,8 +235,7 @@ public class PlayerListener implements Listener {
|
|||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -310,8 +305,7 @@ public class PlayerListener implements Listener {
|
|||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -366,13 +360,11 @@ public class PlayerListener implements Listener {
|
|||||||
if (WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld()))
|
if (WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(event.getEntity() instanceof Player)
|
if (event.getEntity() instanceof Player) {
|
||||||
{
|
|
||||||
Player player = (Player) event.getEntity();
|
Player player = (Player) event.getEntity();
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -499,8 +491,7 @@ public class PlayerListener implements Listener {
|
|||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -547,8 +538,7 @@ public class PlayerListener implements Listener {
|
|||||||
else if (miningManager.canDetonate()) {
|
else if (miningManager.canDetonate()) {
|
||||||
if (type == Material.TNT) {
|
if (type == Material.TNT) {
|
||||||
event.setCancelled(true); // Don't detonate the TNT if they're too close
|
event.setCancelled(true); // Don't detonate the TNT if they're too close
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
miningManager.remoteDetonation();
|
miningManager.remoteDetonation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -602,8 +592,7 @@ public class PlayerListener implements Listener {
|
|||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
/* WORLD GUARD MAIN FLAG CHECK */
|
/* WORLD GUARD MAIN FLAG CHECK */
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
{
|
|
||||||
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
if (!WorldGuardManager.getInstance().hasMainFlag(player))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -714,11 +703,9 @@ public class PlayerListener implements Listener {
|
|||||||
|
|
||||||
if (type == Config.getInstance().getTamingCOTWMaterial(EntityType.WOLF)) {
|
if (type == Config.getInstance().getTamingCOTWMaterial(EntityType.WOLF)) {
|
||||||
tamingManager.summonWolf();
|
tamingManager.summonWolf();
|
||||||
}
|
} else if (type == Config.getInstance().getTamingCOTWMaterial(EntityType.OCELOT)) {
|
||||||
else if (type == Config.getInstance().getTamingCOTWMaterial(EntityType.OCELOT)) {
|
|
||||||
tamingManager.summonOcelot();
|
tamingManager.summonOcelot();
|
||||||
}
|
} else if (type == Config.getInstance().getTamingCOTWMaterial(EntityType.HORSE)) {
|
||||||
else if (type == Config.getInstance().getTamingCOTWMaterial(EntityType.HORSE)) {
|
|
||||||
tamingManager.summonHorse();
|
tamingManager.summonHorse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -763,8 +750,7 @@ public class PlayerListener implements Listener {
|
|||||||
|
|
||||||
chatManager = ChatManagerFactory.getChatManager(plugin, ChatMode.PARTY);
|
chatManager = ChatManagerFactory.getChatManager(plugin, ChatMode.PARTY);
|
||||||
((PartyChatManager) chatManager).setParty(party);
|
((PartyChatManager) chatManager).setParty(party);
|
||||||
}
|
} else if (mcMMOPlayer.isChatEnabled(ChatMode.ADMIN)) {
|
||||||
else if (mcMMOPlayer.isChatEnabled(ChatMode.ADMIN)) {
|
|
||||||
chatManager = ChatManagerFactory.getChatManager(plugin, ChatMode.ADMIN);
|
chatManager = ChatManagerFactory.getChatManager(plugin, ChatMode.ADMIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
package com.gmail.nossr50.listeners;
|
package com.gmail.nossr50.listeners;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.Config;
|
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
|
import com.gmail.nossr50.core.config.skills.Config;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
import com.gmail.nossr50.core.datatypes.experience.XPGainReason;
|
import com.gmail.nossr50.core.datatypes.experience.XPGainReason;
|
||||||
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.core.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
|
import com.gmail.nossr50.core.util.scoreboards.ScoreboardManager;
|
||||||
|
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
||||||
|
import com.gmail.nossr50.core.worldguard.WorldGuardUtils;
|
||||||
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;
|
||||||
import com.gmail.nossr50.events.skills.abilities.McMMOPlayerAbilityActivateEvent;
|
import com.gmail.nossr50.events.skills.abilities.McMMOPlayerAbilityActivateEvent;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.scoreboards.ScoreboardManager;
|
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardUtils;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
@ -22,8 +22,7 @@ public class SelfListener implements Listener {
|
|||||||
//Used in task scheduling and other things
|
//Used in task scheduling and other things
|
||||||
private final mcMMO plugin;
|
private final mcMMO plugin;
|
||||||
|
|
||||||
public SelfListener(mcMMO plugin)
|
public SelfListener(mcMMO plugin) {
|
||||||
{
|
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,8 +32,7 @@ public class SelfListener implements Listener {
|
|||||||
PrimarySkillType skill = event.getSkill();
|
PrimarySkillType skill = event.getSkill();
|
||||||
|
|
||||||
//Players can gain multiple levels especially during xprate events
|
//Players can gain multiple levels especially during xprate events
|
||||||
for(int i = 0; i < event.getLevelsGained(); i++)
|
for (int i = 0; i < event.getLevelsGained(); i++) {
|
||||||
{
|
|
||||||
int previousLevelGained = event.getSkillLevel() - i;
|
int previousLevelGained = event.getSkillLevel() - i;
|
||||||
//Send player skill unlock notifications
|
//Send player skill unlock notifications
|
||||||
UserManager.getPlayer(player).processUnlockNotifications(plugin, event.getSkill(), previousLevelGained);
|
UserManager.getPlayer(player).processUnlockNotifications(plugin, event.getSkill(), previousLevelGained);
|
||||||
@ -74,20 +72,16 @@ public class SelfListener implements Listener {
|
|||||||
if (event.getXpGainReason() == XPGainReason.PVE ||
|
if (event.getXpGainReason() == XPGainReason.PVE ||
|
||||||
event.getXpGainReason() == XPGainReason.PVP ||
|
event.getXpGainReason() == XPGainReason.PVP ||
|
||||||
event.getXpGainReason() == XPGainReason.SHARED_PVE ||
|
event.getXpGainReason() == XPGainReason.SHARED_PVE ||
|
||||||
event.getXpGainReason() == XPGainReason.SHARED_PVP)
|
event.getXpGainReason() == XPGainReason.SHARED_PVP) {
|
||||||
{
|
if (WorldGuardUtils.isWorldGuardLoaded()) {
|
||||||
if(WorldGuardUtils.isWorldGuardLoaded())
|
if (!WorldGuardManager.getInstance().hasXPFlag(player)) {
|
||||||
{
|
|
||||||
if(!WorldGuardManager.getInstance().hasXPFlag(player))
|
|
||||||
{
|
|
||||||
event.setRawXpGained(0);
|
event.setRawXpGained(0);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getXpGainReason() == XPGainReason.COMMAND)
|
if (event.getXpGainReason() == XPGainReason.COMMAND) {
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,12 +118,10 @@ public class SelfListener implements Listener {
|
|||||||
* Make sure players get a guaranteed minimum of XP
|
* Make sure players get a guaranteed minimum of XP
|
||||||
*/
|
*/
|
||||||
//If there is no guaranteed minimum proceed, otherwise only proceed if newValue would be higher than our guaranteed minimum
|
//If there is no guaranteed minimum proceed, otherwise only proceed if newValue would be higher than our guaranteed minimum
|
||||||
if(guaranteedMinimum <= 0 || newValue > guaranteedMinimum)
|
if (guaranteedMinimum <= 0 || newValue > guaranteedMinimum) {
|
||||||
{
|
|
||||||
if (newValue > 0) {
|
if (newValue > 0) {
|
||||||
event.setRawXpGained(newValue);
|
event.setRawXpGained(newValue);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.gmail.nossr50.listeners;
|
package com.gmail.nossr50.listeners;
|
||||||
|
|
||||||
import com.gmail.nossr50.core.config.skills.WorldBlacklist;
|
import com.gmail.nossr50.core.config.skills.WorldBlacklist;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.core.data.blockmeta.conversion.BlockStoreConversionMain;
|
import com.gmail.nossr50.core.data.blockmeta.conversion.BlockStoreConversionMain;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
|
@ -8,14 +8,13 @@ import com.gmail.nossr50.config.mods.ToolConfigManager;
|
|||||||
import com.gmail.nossr50.config.skills.alchemy.PotionConfig;
|
import com.gmail.nossr50.config.skills.alchemy.PotionConfig;
|
||||||
import com.gmail.nossr50.config.skills.repair.RepairConfigManager;
|
import com.gmail.nossr50.config.skills.repair.RepairConfigManager;
|
||||||
import com.gmail.nossr50.config.skills.salvage.SalvageConfigManager;
|
import com.gmail.nossr50.config.skills.salvage.SalvageConfigManager;
|
||||||
import com.gmail.nossr50.core.config.treasure.TreasureConfig;
|
|
||||||
import com.gmail.nossr50.core.config.skills.*;
|
import com.gmail.nossr50.core.config.skills.*;
|
||||||
|
import com.gmail.nossr50.core.config.treasure.TreasureConfig;
|
||||||
|
import com.gmail.nossr50.core.data.UserManager;
|
||||||
|
import com.gmail.nossr50.core.data.blockmeta.chunkmeta.ChunkManager;
|
||||||
|
import com.gmail.nossr50.core.data.blockmeta.chunkmeta.ChunkManagerFactory;
|
||||||
import com.gmail.nossr50.core.data.database.DatabaseManager;
|
import com.gmail.nossr50.core.data.database.DatabaseManager;
|
||||||
import com.gmail.nossr50.core.data.database.DatabaseManagerFactory;
|
import com.gmail.nossr50.core.data.database.DatabaseManagerFactory;
|
||||||
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
|
||||||
import com.gmail.nossr50.core.skills.subskills.acrobatics.Roll;
|
|
||||||
import com.gmail.nossr50.core.util.*;
|
|
||||||
import com.gmail.nossr50.listeners.*;
|
|
||||||
import com.gmail.nossr50.core.party.PartyManager;
|
import com.gmail.nossr50.core.party.PartyManager;
|
||||||
import com.gmail.nossr50.core.runnables.CheckDateTask;
|
import com.gmail.nossr50.core.runnables.CheckDateTask;
|
||||||
import com.gmail.nossr50.core.runnables.SaveTimerTask;
|
import com.gmail.nossr50.core.runnables.SaveTimerTask;
|
||||||
@ -26,24 +25,25 @@ import com.gmail.nossr50.core.runnables.player.ClearRegisteredXPGainTask;
|
|||||||
import com.gmail.nossr50.core.runnables.player.PlayerProfileLoadingTask;
|
import com.gmail.nossr50.core.runnables.player.PlayerProfileLoadingTask;
|
||||||
import com.gmail.nossr50.core.runnables.player.PowerLevelUpdatingTask;
|
import com.gmail.nossr50.core.runnables.player.PowerLevelUpdatingTask;
|
||||||
import com.gmail.nossr50.core.runnables.skills.BleedTimerTask;
|
import com.gmail.nossr50.core.runnables.skills.BleedTimerTask;
|
||||||
import com.gmail.nossr50.core.skills.primary.alchemy.Alchemy;
|
import com.gmail.nossr50.core.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.core.skills.child.ChildConfig;
|
import com.gmail.nossr50.core.skills.child.ChildConfig;
|
||||||
import com.gmail.nossr50.core.skills.primary.repair.repairables.Repairable;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.repair.repairables.RepairableManager;
|
|
||||||
import com.gmail.nossr50.core.skills.primary.repair.repairables.SimpleRepairableManager;
|
|
||||||
import com.gmail.nossr50.core.skills.child.salvage.salvageables.Salvageable;
|
import com.gmail.nossr50.core.skills.child.salvage.salvageables.Salvageable;
|
||||||
import com.gmail.nossr50.core.skills.child.salvage.salvageables.SalvageableManager;
|
import com.gmail.nossr50.core.skills.child.salvage.salvageables.SalvageableManager;
|
||||||
import com.gmail.nossr50.core.skills.child.salvage.salvageables.SimpleSalvageableManager;
|
import com.gmail.nossr50.core.skills.child.salvage.salvageables.SimpleSalvageableManager;
|
||||||
import com.gmail.nossr50.util.*;
|
import com.gmail.nossr50.core.skills.primary.alchemy.Alchemy;
|
||||||
import com.gmail.nossr50.core.data.blockmeta.chunkmeta.ChunkManager;
|
import com.gmail.nossr50.core.skills.primary.repair.repairables.Repairable;
|
||||||
import com.gmail.nossr50.core.data.blockmeta.chunkmeta.ChunkManagerFactory;
|
import com.gmail.nossr50.core.skills.primary.repair.repairables.RepairableManager;
|
||||||
|
import com.gmail.nossr50.core.skills.primary.repair.repairables.SimpleRepairableManager;
|
||||||
|
import com.gmail.nossr50.core.skills.subskills.acrobatics.Roll;
|
||||||
|
import com.gmail.nossr50.core.util.*;
|
||||||
import com.gmail.nossr50.core.util.commands.CommandRegistrationManager;
|
import com.gmail.nossr50.core.util.commands.CommandRegistrationManager;
|
||||||
import com.gmail.nossr50.core.util.experience.FormulaManager;
|
import com.gmail.nossr50.core.util.experience.FormulaManager;
|
||||||
import com.gmail.nossr50.core.data.UserManager;
|
|
||||||
import com.gmail.nossr50.core.util.scoreboards.ScoreboardManager;
|
import com.gmail.nossr50.core.util.scoreboards.ScoreboardManager;
|
||||||
import com.gmail.nossr50.core.util.skills.RankUtils;
|
import com.gmail.nossr50.core.util.skills.RankUtils;
|
||||||
import com.gmail.nossr50.core.util.upgrade.UpgradeManager;
|
import com.gmail.nossr50.core.util.upgrade.UpgradeManager;
|
||||||
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
import com.gmail.nossr50.core.worldguard.WorldGuardManager;
|
||||||
|
import com.gmail.nossr50.listeners.*;
|
||||||
|
import com.gmail.nossr50.util.*;
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
import net.shatteredlands.shatt.backup.ZipLibrary;
|
import net.shatteredlands.shatt.backup.ZipLibrary;
|
||||||
import org.bstats.bukkit.Metrics;
|
import org.bstats.bukkit.Metrics;
|
||||||
@ -61,41 +61,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class mcMMO extends JavaPlugin {
|
public class mcMMO extends JavaPlugin {
|
||||||
/* Managers */
|
|
||||||
private static ChunkManager placeStore;
|
|
||||||
private static RepairableManager repairableManager;
|
|
||||||
private static SalvageableManager salvageableManager;
|
|
||||||
private static ModManager modManager;
|
|
||||||
private static DatabaseManager databaseManager;
|
|
||||||
private static FormulaManager formulaManager;
|
|
||||||
private static HolidayManager holidayManager;
|
|
||||||
private static UpgradeManager upgradeManager;
|
|
||||||
|
|
||||||
/* Blacklist */
|
|
||||||
private static WorldBlacklist worldBlacklist;
|
|
||||||
|
|
||||||
/* File Paths */
|
|
||||||
private static String mainDirectory;
|
|
||||||
private static String flatFileDirectory;
|
|
||||||
private static String usersFile;
|
|
||||||
private static String modDirectory;
|
|
||||||
|
|
||||||
public static mcMMO p;
|
|
||||||
|
|
||||||
// Jar Stuff
|
|
||||||
public static File mcmmo;
|
|
||||||
|
|
||||||
/* Plugin Checks */
|
|
||||||
private static boolean healthBarPluginEnabled;
|
|
||||||
|
|
||||||
// Config Validation Check
|
|
||||||
public boolean noErrorsInConfigFiles = true;
|
|
||||||
|
|
||||||
// XP Event Check
|
|
||||||
private boolean xpEventEnabled;
|
|
||||||
|
|
||||||
private static boolean isRetroModeEnabled;
|
|
||||||
|
|
||||||
/* Metadata Values */
|
/* Metadata Values */
|
||||||
public final static String entityMetadataKey = "mcMMO: Spawned Entity";
|
public final static String entityMetadataKey = "mcMMO: Spawned Entity";
|
||||||
public final static String blockMetadataKey = "mcMMO: Piston Tracking";
|
public final static String blockMetadataKey = "mcMMO: Piston Tracking";
|
||||||
@ -115,8 +80,105 @@ public class mcMMO extends JavaPlugin {
|
|||||||
public final static String greenThumbDataKey = "mcMMO: Green Thumb";
|
public final static String greenThumbDataKey = "mcMMO: Green Thumb";
|
||||||
public final static String databaseCommandKey = "mcMMO: Processing Database Command";
|
public final static String databaseCommandKey = "mcMMO: Processing Database Command";
|
||||||
public final static String bredMetadataKey = "mcMMO: Bred Animal";
|
public final static String bredMetadataKey = "mcMMO: Bred Animal";
|
||||||
|
public static mcMMO p;
|
||||||
|
// Jar Stuff
|
||||||
|
public static File mcmmo;
|
||||||
public static FixedMetadataValue metadataValue;
|
public static FixedMetadataValue metadataValue;
|
||||||
|
/* Managers */
|
||||||
|
private static ChunkManager placeStore;
|
||||||
|
private static RepairableManager repairableManager;
|
||||||
|
private static SalvageableManager salvageableManager;
|
||||||
|
private static ModManager modManager;
|
||||||
|
private static DatabaseManager databaseManager;
|
||||||
|
private static FormulaManager formulaManager;
|
||||||
|
private static HolidayManager holidayManager;
|
||||||
|
private static UpgradeManager upgradeManager;
|
||||||
|
/* Blacklist */
|
||||||
|
private static WorldBlacklist worldBlacklist;
|
||||||
|
/* File Paths */
|
||||||
|
private static String mainDirectory;
|
||||||
|
private static String flatFileDirectory;
|
||||||
|
private static String usersFile;
|
||||||
|
private static String modDirectory;
|
||||||
|
/* Plugin Checks */
|
||||||
|
private static boolean healthBarPluginEnabled;
|
||||||
|
private static boolean isRetroModeEnabled;
|
||||||
|
// Config Validation Check
|
||||||
|
public boolean noErrorsInConfigFiles = true;
|
||||||
|
// XP Event Check
|
||||||
|
private boolean xpEventEnabled;
|
||||||
|
|
||||||
|
public static String getMainDirectory() {
|
||||||
|
return mainDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getFlatFileDirectory() {
|
||||||
|
return flatFileDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getUsersFilePath() {
|
||||||
|
return usersFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getModDirectory() {
|
||||||
|
return modDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FormulaManager getFormulaManager() {
|
||||||
|
return formulaManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HolidayManager getHolidayManager() {
|
||||||
|
return holidayManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ChunkManager getPlaceStore() {
|
||||||
|
return placeStore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RepairableManager getRepairableManager() {
|
||||||
|
return repairableManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SalvageableManager getSalvageableManager() {
|
||||||
|
return salvageableManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DatabaseManager getDatabaseManager() {
|
||||||
|
return databaseManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static void setDatabaseManager(DatabaseManager databaseManager) {
|
||||||
|
mcMMO.databaseManager = databaseManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ModManager getModManager() {
|
||||||
|
return modManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static UpgradeManager getUpgradeManager() {
|
||||||
|
return upgradeManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isHealthBarPluginEnabled() {
|
||||||
|
return healthBarPluginEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if this plugin is using retro mode
|
||||||
|
* Retro mode is a 0-1000 skill system
|
||||||
|
* Standard mode is scaled for 1-100
|
||||||
|
*
|
||||||
|
* @return true if retro mode is enabled
|
||||||
|
*/
|
||||||
|
public static boolean isRetroModeEnabled() {
|
||||||
|
return isRetroModeEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static WorldBlacklist getWorldBlacklist() {
|
||||||
|
return worldBlacklist;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Things to be run when the plugin is enabled.
|
* Things to be run when the plugin is enabled.
|
||||||
@ -201,14 +263,12 @@ public class mcMMO extends JavaPlugin {
|
|||||||
else
|
else
|
||||||
metrics.addCustomChart(new Metrics.SimplePie("scaling", () -> "Retro"));
|
metrics.addCustomChart(new Metrics.SimplePie("scaling", () -> "Retro"));
|
||||||
}
|
}
|
||||||
}
|
} catch (Throwable t) {
|
||||||
catch (Throwable t) {
|
|
||||||
getLogger().severe("There was an error while enabling mcMMO!");
|
getLogger().severe("There was an error while enabling mcMMO!");
|
||||||
|
|
||||||
if (!(t instanceof ExceptionInInitializerError)) {
|
if (!(t instanceof ExceptionInInitializerError)) {
|
||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
getLogger().info("Please do not replace the mcMMO jar while the server is running.");
|
getLogger().info("Please do not replace the mcMMO jar while the server is running.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,8 +280,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoad()
|
public void onLoad() {
|
||||||
{
|
|
||||||
if (getServer().getPluginManager().getPlugin("WorldGuard") != null)
|
if (getServer().getPluginManager().getPlugin("WorldGuard") != null)
|
||||||
WorldGuardManager.getInstance().registerFlags();
|
WorldGuardManager.getInstance().registerFlags();
|
||||||
}
|
}
|
||||||
@ -245,8 +304,9 @@ public class mcMMO extends JavaPlugin {
|
|||||||
holidayManager.saveAnniversaryFiles();
|
holidayManager.saveAnniversaryFiles();
|
||||||
placeStore.saveAll(); // Save our metadata
|
placeStore.saveAll(); // Save our metadata
|
||||||
placeStore.cleanUp(); // Cleanup empty metadata stores
|
placeStore.cleanUp(); // Cleanup empty metadata stores
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
catch (NullPointerException e) { e.printStackTrace(); }
|
|
||||||
|
|
||||||
debug("Canceling all tasks...");
|
debug("Canceling all tasks...");
|
||||||
getServer().getScheduler().cancelTasks(this); // This removes our tasks
|
getServer().getScheduler().cancelTasks(this); // This removes our tasks
|
||||||
@ -257,16 +317,13 @@ public class mcMMO extends JavaPlugin {
|
|||||||
// Remove other tasks BEFORE starting the Backup, or we just cancel it straight away.
|
// Remove other tasks BEFORE starting the Backup, or we just cancel it straight away.
|
||||||
try {
|
try {
|
||||||
ZipLibrary.mcMMOBackup();
|
ZipLibrary.mcMMOBackup();
|
||||||
}
|
} catch (IOException e) {
|
||||||
catch (IOException e) {
|
|
||||||
getLogger().severe(e.toString());
|
getLogger().severe(e.toString());
|
||||||
}
|
} catch (Throwable e) {
|
||||||
catch (Throwable e) {
|
|
||||||
if (e instanceof NoClassDefFoundError) {
|
if (e instanceof NoClassDefFoundError) {
|
||||||
getLogger().severe("Backup class not found!");
|
getLogger().severe("Backup class not found!");
|
||||||
getLogger().info("Please do not replace the mcMMO jar while the server is running.");
|
getLogger().info("Please do not replace the mcMMO jar while the server is running.");
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
getLogger().severe(e.toString());
|
getLogger().severe(e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -276,22 +333,6 @@ public class mcMMO extends JavaPlugin {
|
|||||||
debug("Was disabled."); // How informative!
|
debug("Was disabled."); // How informative!
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getMainDirectory() {
|
|
||||||
return mainDirectory;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getFlatFileDirectory() {
|
|
||||||
return flatFileDirectory;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getUsersFilePath() {
|
|
||||||
return usersFile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getModDirectory() {
|
|
||||||
return modDirectory;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isXPEventEnabled() {
|
public boolean isXPEventEnabled() {
|
||||||
return xpEventEnabled;
|
return xpEventEnabled;
|
||||||
}
|
}
|
||||||
@ -308,47 +349,6 @@ public class mcMMO extends JavaPlugin {
|
|||||||
getLogger().info("[Debug] " + message);
|
getLogger().info("[Debug] " + message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FormulaManager getFormulaManager() {
|
|
||||||
return formulaManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HolidayManager getHolidayManager() {
|
|
||||||
return holidayManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ChunkManager getPlaceStore() {
|
|
||||||
return placeStore;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static RepairableManager getRepairableManager() {
|
|
||||||
return repairableManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static SalvageableManager getSalvageableManager() {
|
|
||||||
return salvageableManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static DatabaseManager getDatabaseManager() {
|
|
||||||
return databaseManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ModManager getModManager() {
|
|
||||||
return modManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static UpgradeManager getUpgradeManager() {
|
|
||||||
return upgradeManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static void setDatabaseManager(DatabaseManager databaseManager) {
|
|
||||||
mcMMO.databaseManager = databaseManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isHealthBarPluginEnabled() {
|
|
||||||
return healthBarPluginEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup the various storage file paths
|
* Setup the various storage file paths
|
||||||
*/
|
*/
|
||||||
@ -475,8 +475,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
* Acrobatics skills
|
* Acrobatics skills
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(CoreSkillsConfig.getInstance().isPrimarySkillEnabled(PrimarySkillType.ACROBATICS))
|
if (CoreSkillsConfig.getInstance().isPrimarySkillEnabled(PrimarySkillType.ACROBATICS)) {
|
||||||
{
|
|
||||||
System.out.println("[mcMMO]" + " enabling Acrobatics Skills");
|
System.out.println("[mcMMO]" + " enabling Acrobatics Skills");
|
||||||
|
|
||||||
//TODO: Should do this differently
|
//TODO: Should do this differently
|
||||||
@ -510,8 +509,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
|
|
||||||
if (purgeIntervalTicks == 0) {
|
if (purgeIntervalTicks == 0) {
|
||||||
new UserPurgeTask().runTaskLaterAsynchronously(this, 2 * Misc.TICK_CONVERSION_FACTOR); // Start 2 seconds after startup.
|
new UserPurgeTask().runTaskLaterAsynchronously(this, 2 * Misc.TICK_CONVERSION_FACTOR); // Start 2 seconds after startup.
|
||||||
}
|
} else if (purgeIntervalTicks > 0) {
|
||||||
else if (purgeIntervalTicks > 0) {
|
|
||||||
new UserPurgeTask().runTaskTimerAsynchronously(this, purgeIntervalTicks, purgeIntervalTicks);
|
new UserPurgeTask().runTaskTimerAsynchronously(this, purgeIntervalTicks, purgeIntervalTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -520,8 +518,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
|
|
||||||
if (kickIntervalTicks == 0) {
|
if (kickIntervalTicks == 0) {
|
||||||
new PartyAutoKickTask().runTaskLater(this, 2 * Misc.TICK_CONVERSION_FACTOR); // Start 2 seconds after startup.
|
new PartyAutoKickTask().runTaskLater(this, 2 * Misc.TICK_CONVERSION_FACTOR); // Start 2 seconds after startup.
|
||||||
}
|
} else if (kickIntervalTicks > 0) {
|
||||||
else if (kickIntervalTicks > 0) {
|
|
||||||
new PartyAutoKickTask().runTaskTimer(this, kickIntervalTicks, kickIntervalTicks);
|
new PartyAutoKickTask().runTaskTimer(this, kickIntervalTicks, kickIntervalTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -564,18 +561,4 @@ public class mcMMO extends JavaPlugin {
|
|||||||
InputStream in = getResource(fileName);
|
InputStream in = getResource(fileName);
|
||||||
return in == null ? null : new InputStreamReader(in, Charsets.UTF_8);
|
return in == null ? null : new InputStreamReader(in, Charsets.UTF_8);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if this plugin is using retro mode
|
|
||||||
* Retro mode is a 0-1000 skill system
|
|
||||||
* Standard mode is scaled for 1-100
|
|
||||||
* @return true if retro mode is enabled
|
|
||||||
*/
|
|
||||||
public static boolean isRetroModeEnabled() {
|
|
||||||
return isRetroModeEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static WorldBlacklist getWorldBlacklist() {
|
|
||||||
return worldBlacklist;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -14,114 +14,6 @@ import java.util.Map.Entry;
|
|||||||
|
|
||||||
public class PotionConfigGenerator {
|
public class PotionConfigGenerator {
|
||||||
|
|
||||||
public static class Ingredient {
|
|
||||||
|
|
||||||
public Material mat;
|
|
||||||
public int data;
|
|
||||||
public String name;
|
|
||||||
|
|
||||||
public Ingredient(Material mat) {
|
|
||||||
this.mat = mat;
|
|
||||||
this.data = 0;
|
|
||||||
name = mat.name();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
public static class WriteablePotion {
|
|
||||||
|
|
||||||
public String name;
|
|
||||||
public Material mat;
|
|
||||||
public PotionData data;
|
|
||||||
public PotionEffect effect;
|
|
||||||
public String baseName;
|
|
||||||
|
|
||||||
public WriteablePotion(PotionData data) {
|
|
||||||
this(Material.POTION, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public WriteablePotion(Material type, PotionData data) {
|
|
||||||
this(type, data, null, getMCName(data.getType()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public WriteablePotion(Material mat, PotionType type, PotionEffect effect, String baseName) {
|
|
||||||
this(mat, new PotionData(type, false, false), effect, baseName);
|
|
||||||
}
|
|
||||||
|
|
||||||
public WriteablePotion(Material type, PotionData data, PotionEffect effect, String baseName) {
|
|
||||||
this.data = data;
|
|
||||||
this.effect = effect;
|
|
||||||
this.mat = type;
|
|
||||||
this.baseName = baseName;
|
|
||||||
this.name = "POTION_OF_" + baseName;
|
|
||||||
if (mat == Material.SPLASH_POTION) {
|
|
||||||
this.name = "SPLASH_" + this.name;
|
|
||||||
}
|
|
||||||
if (mat == Material.LINGERING_POTION) {
|
|
||||||
this.name = "LINGERING_" + this.name;
|
|
||||||
}
|
|
||||||
if (data.isExtended()) {
|
|
||||||
this.name += "_EXTENDED";
|
|
||||||
}
|
|
||||||
if (data.isUpgraded()) {
|
|
||||||
this.name += "_II";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public WriteablePotion(PotionType type) {
|
|
||||||
this(new PotionData(type, false, false));
|
|
||||||
}
|
|
||||||
|
|
||||||
public WriteablePotion(Material mat, PotionType type) {
|
|
||||||
this(mat, new PotionData(type, false, false));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static String getMCName(PotionType type) {
|
|
||||||
switch (type) {
|
|
||||||
case INSTANT_DAMAGE :
|
|
||||||
return "HARMING";
|
|
||||||
case INSTANT_HEAL :
|
|
||||||
return "HEALING";
|
|
||||||
case JUMP :
|
|
||||||
return "LEAPING";
|
|
||||||
case REGEN :
|
|
||||||
return "REGENERATION";
|
|
||||||
case SPEED :
|
|
||||||
return "SWIFTNESS";
|
|
||||||
case UNCRAFTABLE :
|
|
||||||
return "EMPTY";
|
|
||||||
case LUCK :
|
|
||||||
case MUNDANE :
|
|
||||||
case NIGHT_VISION :
|
|
||||||
case POISON :
|
|
||||||
case INVISIBILITY :
|
|
||||||
case SLOWNESS :
|
|
||||||
case AWKWARD :
|
|
||||||
case STRENGTH :
|
|
||||||
case THICK :
|
|
||||||
case FIRE_RESISTANCE :
|
|
||||||
case WATER :
|
|
||||||
case WATER_BREATHING :
|
|
||||||
case WEAKNESS :
|
|
||||||
case TURTLE_MASTER:
|
|
||||||
case SLOW_FALLING:
|
|
||||||
return type.name();
|
|
||||||
default :
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int hashCode() {
|
|
||||||
return name.hashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean equals(Object obj) {
|
|
||||||
if (!(obj instanceof WriteablePotion)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return name.equals(((WriteablePotion) obj).name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Map<WriteablePotion, Map<Ingredient, WriteablePotion>> vanillaPotions = new HashMap<>();
|
Map<WriteablePotion, Map<Ingredient, WriteablePotion>> vanillaPotions = new HashMap<>();
|
||||||
populateVanillaPotions(vanillaPotions);
|
populateVanillaPotions(vanillaPotions);
|
||||||
@ -620,4 +512,113 @@ public class PotionConfigGenerator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class Ingredient {
|
||||||
|
|
||||||
|
public Material mat;
|
||||||
|
public int data;
|
||||||
|
public String name;
|
||||||
|
|
||||||
|
public Ingredient(Material mat) {
|
||||||
|
this.mat = mat;
|
||||||
|
this.data = 0;
|
||||||
|
name = mat.name();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class WriteablePotion {
|
||||||
|
|
||||||
|
public String name;
|
||||||
|
public Material mat;
|
||||||
|
public PotionData data;
|
||||||
|
public PotionEffect effect;
|
||||||
|
public String baseName;
|
||||||
|
|
||||||
|
public WriteablePotion(PotionData data) {
|
||||||
|
this(Material.POTION, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public WriteablePotion(Material type, PotionData data) {
|
||||||
|
this(type, data, null, getMCName(data.getType()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public WriteablePotion(Material mat, PotionType type, PotionEffect effect, String baseName) {
|
||||||
|
this(mat, new PotionData(type, false, false), effect, baseName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public WriteablePotion(Material type, PotionData data, PotionEffect effect, String baseName) {
|
||||||
|
this.data = data;
|
||||||
|
this.effect = effect;
|
||||||
|
this.mat = type;
|
||||||
|
this.baseName = baseName;
|
||||||
|
this.name = "POTION_OF_" + baseName;
|
||||||
|
if (mat == Material.SPLASH_POTION) {
|
||||||
|
this.name = "SPLASH_" + this.name;
|
||||||
|
}
|
||||||
|
if (mat == Material.LINGERING_POTION) {
|
||||||
|
this.name = "LINGERING_" + this.name;
|
||||||
|
}
|
||||||
|
if (data.isExtended()) {
|
||||||
|
this.name += "_EXTENDED";
|
||||||
|
}
|
||||||
|
if (data.isUpgraded()) {
|
||||||
|
this.name += "_II";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public WriteablePotion(PotionType type) {
|
||||||
|
this(new PotionData(type, false, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public WriteablePotion(Material mat, PotionType type) {
|
||||||
|
this(mat, new PotionData(type, false, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String getMCName(PotionType type) {
|
||||||
|
switch (type) {
|
||||||
|
case INSTANT_DAMAGE:
|
||||||
|
return "HARMING";
|
||||||
|
case INSTANT_HEAL:
|
||||||
|
return "HEALING";
|
||||||
|
case JUMP:
|
||||||
|
return "LEAPING";
|
||||||
|
case REGEN:
|
||||||
|
return "REGENERATION";
|
||||||
|
case SPEED:
|
||||||
|
return "SWIFTNESS";
|
||||||
|
case UNCRAFTABLE:
|
||||||
|
return "EMPTY";
|
||||||
|
case LUCK:
|
||||||
|
case MUNDANE:
|
||||||
|
case NIGHT_VISION:
|
||||||
|
case POISON:
|
||||||
|
case INVISIBILITY:
|
||||||
|
case SLOWNESS:
|
||||||
|
case AWKWARD:
|
||||||
|
case STRENGTH:
|
||||||
|
case THICK:
|
||||||
|
case FIRE_RESISTANCE:
|
||||||
|
case WATER:
|
||||||
|
case WATER_BREATHING:
|
||||||
|
case WEAKNESS:
|
||||||
|
case TURTLE_MASTER:
|
||||||
|
case SLOW_FALLING:
|
||||||
|
return type.name();
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int hashCode() {
|
||||||
|
return name.hashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
if (!(obj instanceof WriteablePotion)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return name.equals(((WriteablePotion) obj).name);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
#Giga Bohrhammer in Giga Bohrer umbenannt.
|
#Giga Bohrhammer in Giga Bohrer umbenannt.
|
||||||
#Added Guides.Smelting.Section.1
|
#Added Guides.Smelting.Section.1
|
||||||
# --Lumis31
|
# --Lumis31
|
||||||
|
|
||||||
#ACROBATICS
|
#ACROBATICS
|
||||||
Acrobatics.Ability.Proc=[[GREEN]]**Grazi\u00f6s Abgerollt**
|
Acrobatics.Ability.Proc=[[GREEN]]**Grazi\u00f6s Abgerollt**
|
||||||
Acrobatics.Combat.Proc=[[GREEN]]**Ausgewichen**
|
Acrobatics.Combat.Proc=[[GREEN]]**Ausgewichen**
|
||||||
@ -47,7 +46,6 @@ Acrobatics.SubSkill.Roll.GraceChance=Grazi\u00f6se Rolle-Chance: [[YELLOW]]{0}
|
|||||||
Acrobatics.Roll.Text=**Abgerollt**
|
Acrobatics.Roll.Text=**Abgerollt**
|
||||||
Acrobatics.SkillName=AKROBATIK
|
Acrobatics.SkillName=AKROBATIK
|
||||||
Acrobatics.Skillup=Akrobatik Skill um {0} gestiegen. Gesamt ({1})
|
Acrobatics.Skillup=Akrobatik Skill um {0} gestiegen. Gesamt ({1})
|
||||||
|
|
||||||
#ALCHEMY
|
#ALCHEMY
|
||||||
Alchemy.SubSkill.Catalysis.Name=Katalyse
|
Alchemy.SubSkill.Catalysis.Name=Katalyse
|
||||||
Alchemy.SubSkill.Catalysis.Description=Erh\u00F6ht die Braugeschwindigkeit
|
Alchemy.SubSkill.Catalysis.Description=Erh\u00F6ht die Braugeschwindigkeit
|
||||||
@ -60,7 +58,6 @@ Alchemy.Concoctions.Rank=Braukunst Rang: [[YELLOW]]{0}/{1}
|
|||||||
Alchemy.Concoctions.Ingredients=Zutaten [[[YELLOW]]{0}[[RED]]]: [[YELLOW]]{1}
|
Alchemy.Concoctions.Ingredients=Zutaten [[[YELLOW]]{0}[[RED]]]: [[YELLOW]]{1}
|
||||||
Alchemy.SkillName=ALCHEMIE
|
Alchemy.SkillName=ALCHEMIE
|
||||||
Alchemy.Skillup=Alchemie Skill um {0} gestiegen. Gesamt ({1})
|
Alchemy.Skillup=Alchemie Skill um {0} gestiegen. Gesamt ({1})
|
||||||
|
|
||||||
#ARCHERY
|
#ARCHERY
|
||||||
Archery.Combat.DazeChance=Chance auf Bet\u00e4ubung: [[YELLOW]]{0}
|
Archery.Combat.DazeChance=Chance auf Bet\u00e4ubung: [[YELLOW]]{0}
|
||||||
Archery.Combat.RetrieveChance=Chance auf Pfeil-R\u00fcckgewinnung: [[YELLOW]]{0}
|
Archery.Combat.RetrieveChance=Chance auf Pfeil-R\u00fcckgewinnung: [[YELLOW]]{0}
|
||||||
@ -74,7 +71,6 @@ Archery.SubSkill.ArrowRetrieval.Description=Chance auf Pfeil-R\u00fcckgewinnung
|
|||||||
Archery.Listener=Bogen:
|
Archery.Listener=Bogen:
|
||||||
Archery.SkillName=BOGEN
|
Archery.SkillName=BOGEN
|
||||||
Archery.Skillup=Bogenschie\u00DFen Fertigkeit ist um {0} gestiegen. Gesamt ({1})
|
Archery.Skillup=Bogenschie\u00DFen Fertigkeit ist um {0} gestiegen. Gesamt ({1})
|
||||||
|
|
||||||
#AXES
|
#AXES
|
||||||
Axes.Ability.Bonus.0=Axt-Beherrschung
|
Axes.Ability.Bonus.0=Axt-Beherrschung
|
||||||
Axes.Ability.Bonus.1={0} Zusatz-Schaden
|
Axes.Ability.Bonus.1={0} Zusatz-Schaden
|
||||||
@ -109,7 +105,6 @@ Axes.Skills.SS.Refresh=[[GREEN]]Dein [[YELLOW]]Sch\u00e4del-Spalter [[GREEN]]ist
|
|||||||
Axes.Skills.SS.Other.Off={0}s [[RED]]Sch\u00e4del-Spalter[[GREEN]] ist [[GREEN]]abgenutzt
|
Axes.Skills.SS.Other.Off={0}s [[RED]]Sch\u00e4del-Spalter[[GREEN]] ist [[GREEN]]abgenutzt
|
||||||
Axes.Skills.SS.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]Sch\u00e4del-Spalter!
|
Axes.Skills.SS.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]Sch\u00e4del-Spalter!
|
||||||
Axes.Skillup=Axt Skill um {0} gestiegen. Gesamt ({1})
|
Axes.Skillup=Axt Skill um {0} gestiegen. Gesamt ({1})
|
||||||
|
|
||||||
#EXCAVATION
|
#EXCAVATION
|
||||||
Excavation.Ability.Lower=[[GRAY]]**Du senkst deine SCHAUFEL**
|
Excavation.Ability.Lower=[[GRAY]]**Du senkst deine SCHAUFEL**
|
||||||
Excavation.Ability.Ready=[[GREEN]]**Deine SCHAUFEL ist bereit**
|
Excavation.Ability.Ready=[[GREEN]]**Deine SCHAUFEL ist bereit**
|
||||||
@ -126,7 +121,6 @@ Excavation.Skills.GigaDrillBreaker.Refresh=[[GREEN]]Dein [[YELLOW]]Giga Bohrer [
|
|||||||
Excavation.Skills.GigaDrillBreaker.Other.Off={0}s [[RED]]Giga Bohrer[[GREEN]] ist [[GREEN]]ausgelaufen
|
Excavation.Skills.GigaDrillBreaker.Other.Off={0}s [[RED]]Giga Bohrer[[GREEN]] ist [[GREEN]]ausgelaufen
|
||||||
Excavation.Skills.GigaDrillBreaker.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]Giga Bohrer!
|
Excavation.Skills.GigaDrillBreaker.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]Giga Bohrer!
|
||||||
Excavation.Skillup=Graben Skill um {0} gestiegen. Gesamt ({1})
|
Excavation.Skillup=Graben Skill um {0} gestiegen. Gesamt ({1})
|
||||||
|
|
||||||
#FISHING
|
#FISHING
|
||||||
Fishing.Ability.Chance=Anbei\u00DFwahrscheinlichkeit: [[YELLOW]]{0}
|
Fishing.Ability.Chance=Anbei\u00DFwahrscheinlichkeit: [[YELLOW]]{0}
|
||||||
Fishing.Ability.Info=Zauber-J\u00e4ger: [[GRAY]] **Verbessert sich mit Schatz-J\u00e4ger Rang**
|
Fishing.Ability.Info=Zauber-J\u00e4ger: [[GRAY]] **Verbessert sich mit Schatz-J\u00e4ger Rang**
|
||||||
@ -158,7 +152,6 @@ Fishing.Ability.TH.Boom=[[GRAY]]KARPADOR SETZT PLATSCHER EIN!!!
|
|||||||
Fishing.Ability.TH.Poison=[[GRAY]]Hier stinkt etwas...
|
Fishing.Ability.TH.Poison=[[GRAY]]Hier stinkt etwas...
|
||||||
Fishing.SkillName=ANGELN
|
Fishing.SkillName=ANGELN
|
||||||
Fishing.Skillup=Angel Skill um {0} gestiegen. Gesamt ({1})
|
Fishing.Skillup=Angel Skill um {0} gestiegen. Gesamt ({1})
|
||||||
|
|
||||||
#HERBALISM
|
#HERBALISM
|
||||||
Herbalism.Ability.DoubleDropChance=Chance auf Doppel-Drops: [[YELLOW]]{0}
|
Herbalism.Ability.DoubleDropChance=Chance auf Doppel-Drops: [[YELLOW]]{0}
|
||||||
Herbalism.Ability.FD=Bauernfr\u00fchst\u00fcck: [[YELLOW]]Stufe {0}
|
Herbalism.Ability.FD=Bauernfr\u00fchst\u00fcck: [[YELLOW]]Stufe {0}
|
||||||
@ -195,7 +188,6 @@ Herbalism.Skills.GTe.Refresh=[[GREEN]]Deine [[YELLOW]]Gr\u00fcnes Land [[GREEN]]
|
|||||||
Herbalism.Skills.GTe.Other.Off={0}s [[RED]]Gr\u00fcnes Land[[GREEN]] ist [[GREEN]]ausgelaufen.
|
Herbalism.Skills.GTe.Other.Off={0}s [[RED]]Gr\u00fcnes Land[[GREEN]] ist [[GREEN]]ausgelaufen.
|
||||||
Herbalism.Skills.GTe.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]Gr\u00fcnes Land!
|
Herbalism.Skills.GTe.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]Gr\u00fcnes Land!
|
||||||
Herbalism.Skillup=Pflanzenkunde Skill um {0} gestiegen. Gesamt ({1})
|
Herbalism.Skillup=Pflanzenkunde Skill um {0} gestiegen. Gesamt ({1})
|
||||||
|
|
||||||
#MINING
|
#MINING
|
||||||
Mining.Ability.Length=Super-Brecher Dauer: [[YELLOW]]{0}s
|
Mining.Ability.Length=Super-Brecher Dauer: [[YELLOW]]{0}s
|
||||||
Mining.Ability.Locked.0=GESPERRT bis Skill {0}+ (Z\u00fcndstoff)
|
Mining.Ability.Locked.0=GESPERRT bis Skill {0}+ (Z\u00fcndstoff)
|
||||||
@ -223,7 +215,6 @@ Mining.Skills.SuperBreaker.Other.Off={0}s [[RED]]Super-Brecher[[GREEN]] ist [[GR
|
|||||||
Mining.Skills.SuperBreaker.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]Super-Brecher!
|
Mining.Skills.SuperBreaker.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]Super-Brecher!
|
||||||
Mining.Skills.SuperBreaker.Refresh=[[GREEN]]Dein [[YELLOW]]Super-Brecher [[GREEN]]ist wieder bereit!
|
Mining.Skills.SuperBreaker.Refresh=[[GREEN]]Dein [[YELLOW]]Super-Brecher [[GREEN]]ist wieder bereit!
|
||||||
Mining.Skillup=Bergbau Fertigkeit ist um {0} gestiegen. Gesamt ({1})
|
Mining.Skillup=Bergbau Fertigkeit ist um {0} gestiegen. Gesamt ({1})
|
||||||
|
|
||||||
#Blast Mining
|
#Blast Mining
|
||||||
Mining.Blast.Boom=[[GRAY]]**BOOM**
|
Mining.Blast.Boom=[[GRAY]]**BOOM**
|
||||||
Mining.Blast.Effect=+{0} Erze -{1} Schutt, {2}x Drops
|
Mining.Blast.Effect=+{0} Erze -{1} Schutt, {2}x Drops
|
||||||
@ -231,7 +222,6 @@ Mining.Blast.Radius.Increase=Z\u00fcndstoff Radius Erh\u00f6hung: [[YELLOW]]+{0}
|
|||||||
Mining.Blast.Rank=Z\u00fcndstoff Rang:[[YELLOW]] {0}/8 [[GRAY]]({1})
|
Mining.Blast.Rank=Z\u00fcndstoff Rang:[[YELLOW]] {0}/8 [[GRAY]]({1})
|
||||||
Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]Z\u00fcndstoff!
|
Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]Z\u00fcndstoff!
|
||||||
Mining.Blast.Refresh=[[GREEN]]Dein [[YELLOW]]Z\u00fcndstoff [[GREEN]]ist wieder bereit!
|
Mining.Blast.Refresh=[[GREEN]]Dein [[YELLOW]]Z\u00fcndstoff [[GREEN]]ist wieder bereit!
|
||||||
|
|
||||||
#REPAIR
|
#REPAIR
|
||||||
Repair.SubSkill.Repair.Name=Reparatur
|
Repair.SubSkill.Repair.Name=Reparatur
|
||||||
Repair.SubSkill.Repair.Description=Repariere Werkzeuge & R\u00fcstung
|
Repair.SubSkill.Repair.Description=Repariere Werkzeuge & R\u00fcstung
|
||||||
@ -265,7 +255,6 @@ Repair.Skills.StackedItems=[[DARK_RED]]Du kannst keine gestapelten Gegenst\u00e4
|
|||||||
Repair.Skills.Super.Chance=Super-Reparatur Chance: [[YELLOW]]{0}
|
Repair.Skills.Super.Chance=Super-Reparatur Chance: [[YELLOW]]{0}
|
||||||
Repair.Skillup=Reparatur Skill um {0} gestiegen. Gesamt ({1})
|
Repair.Skillup=Reparatur Skill um {0} gestiegen. Gesamt ({1})
|
||||||
Repair.Pretty.Name=Reparatur
|
Repair.Pretty.Name=Reparatur
|
||||||
|
|
||||||
#Arcane Forging
|
#Arcane Forging
|
||||||
Repair.Arcane.Chance.Downgrade=[[GRAY]]AS Verminderungs Chance: [[YELLOW]]{0}%
|
Repair.Arcane.Chance.Downgrade=[[GRAY]]AS Verminderungs Chance: [[YELLOW]]{0}%
|
||||||
Repair.Arcane.Chance.Success=[[GRAY]]AS Erfolgs-Rate: [[YELLOW]]{0}%
|
Repair.Arcane.Chance.Success=[[GRAY]]AS Erfolgs-Rate: [[YELLOW]]{0}%
|
||||||
@ -274,7 +263,6 @@ Repair.Arcane.Fail=Der Gegenstands wurde entzaubert.
|
|||||||
Repair.Arcane.Lost=Du hast nicht gen\u00fcgend Skill um Verzauberungen zu erhalten.
|
Repair.Arcane.Lost=Du hast nicht gen\u00fcgend Skill um Verzauberungen zu erhalten.
|
||||||
Repair.Arcane.Perfect=[[GREEN]]Du hast den Zauber-Wert des Gegenstands erhalten.
|
Repair.Arcane.Perfect=[[GREEN]]Du hast den Zauber-Wert des Gegenstands erhalten.
|
||||||
Repair.Arcane.Rank=Arkanes Schmieden Rang: [[YELLOW]]{0}/{1}
|
Repair.Arcane.Rank=Arkanes Schmieden Rang: [[YELLOW]]{0}/{1}
|
||||||
|
|
||||||
#SALVAGE
|
#SALVAGE
|
||||||
Salvage.Pretty.Name=Verwerten
|
Salvage.Pretty.Name=Verwerten
|
||||||
Salvage.SubSkill.AdvancedSalvage.Name=Fortgeschrittenes Verwerten
|
Salvage.SubSkill.AdvancedSalvage.Name=Fortgeschrittenes Verwerten
|
||||||
@ -297,7 +285,6 @@ Salvage.Skills.ArcaneSuccess=[[GREEN]]Du konntest alles Wissen aus diesem Item e
|
|||||||
Salvage.Listener.Anvil=[[DARK_RED]]Du hast einen Verwertungs-Amboss platziert, benutze ihn um Werkzeuge und R\u00FCstung zu verwerten.
|
Salvage.Listener.Anvil=[[DARK_RED]]Du hast einen Verwertungs-Amboss platziert, benutze ihn um Werkzeuge und R\u00FCstung zu verwerten.
|
||||||
Salvage.Listener=Verwerten:
|
Salvage.Listener=Verwerten:
|
||||||
Salvage.SkillName=VERWERTEN
|
Salvage.SkillName=VERWERTEN
|
||||||
|
|
||||||
#SWORDS
|
#SWORDS
|
||||||
Swords.Ability.Lower=[[GRAY]]**Du senkst dein SCHWERT**
|
Swords.Ability.Lower=[[GRAY]]**Du senkst dein SCHWERT**
|
||||||
Swords.Ability.Ready=[[GREEN]]**Dein SCHWERT ist bereit**
|
Swords.Ability.Ready=[[GREEN]]**Dein SCHWERT ist bereit**
|
||||||
@ -328,7 +315,6 @@ Swords.Skills.SS.Other.Off={0}s [[RED]]S\u00e4gezahnschlag[[GREEN]] ist [[GREEN]
|
|||||||
Swords.Skills.SS.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]S\u00e4gezahnschlag!
|
Swords.Skills.SS.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]S\u00e4gezahnschlag!
|
||||||
Swords.Skillup=Schwert Skill um {0} gestiegen. Gesamt ({1})
|
Swords.Skillup=Schwert Skill um {0} gestiegen. Gesamt ({1})
|
||||||
Swords.SS.Length=S\u00e4gezahnschlag Dauer: [[YELLOW]]{0}s
|
Swords.SS.Length=S\u00e4gezahnschlag Dauer: [[YELLOW]]{0}s
|
||||||
|
|
||||||
#TAMING
|
#TAMING
|
||||||
Taming.Ability.Bonus.0=Umweltbewusst
|
Taming.Ability.Bonus.0=Umweltbewusst
|
||||||
Taming.Ability.Bonus.1=W\u00f6lfe weichen Gefahren aus
|
Taming.Ability.Bonus.1=W\u00f6lfe weichen Gefahren aus
|
||||||
@ -379,7 +365,6 @@ Taming.Summon.Fail.Wolf=Du hast zu viele W\u00f6lfe um dich, um weitere zu besch
|
|||||||
Taming.Summon.Fail.Horse=Du hast zu viele Pferde um dich, um weitere zu beschw\u00f6ren.
|
Taming.Summon.Fail.Horse=Du hast zu viele Pferde um dich, um weitere zu beschw\u00f6ren.
|
||||||
Taming.Summon.Fail.TooMany=Du hast das Maximum an beschworenen Tieren erreicht [[YELLOW]]({0})
|
Taming.Summon.Fail.TooMany=Du hast das Maximum an beschworenen Tieren erreicht [[YELLOW]]({0})
|
||||||
Taming.Summon.Name.Format={0}''s {1}
|
Taming.Summon.Name.Format={0}''s {1}
|
||||||
|
|
||||||
#UNARMED
|
#UNARMED
|
||||||
Unarmed.Ability.Berserk.Length=Berserker Dauer: [[YELLOW]]{0}s
|
Unarmed.Ability.Berserk.Length=Berserker Dauer: [[YELLOW]]{0}s
|
||||||
Unarmed.Ability.Bonus.0=Eiserner Arm
|
Unarmed.Ability.Bonus.0=Eiserner Arm
|
||||||
@ -409,7 +394,6 @@ Unarmed.Skills.Berserk.Other.Off={0}s [[RED]]Berserker[[GREEN]] ist [[GREEN]]aus
|
|||||||
Unarmed.Skills.Berserk.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]Berserker!
|
Unarmed.Skills.Berserk.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED]]Berserker!
|
||||||
Unarmed.Skills.Berserk.Refresh=[[GREEN]]Dein [[YELLOW]]Berserker [[GREEN]]ist wieder bereit!
|
Unarmed.Skills.Berserk.Refresh=[[GREEN]]Dein [[YELLOW]]Berserker [[GREEN]]ist wieder bereit!
|
||||||
Unarmed.Skillup=Unbewaffnet Skill um {0} gestiegen. Gesamt ({1})
|
Unarmed.Skillup=Unbewaffnet Skill um {0} gestiegen. Gesamt ({1})
|
||||||
|
|
||||||
#WOODCUTTING
|
#WOODCUTTING
|
||||||
Woodcutting.Ability.0=Bl\u00e4ttersturm
|
Woodcutting.Ability.0=Bl\u00e4ttersturm
|
||||||
Woodcutting.Ability.1=Bl\u00e4st Bl\u00e4tter davon
|
Woodcutting.Ability.1=Bl\u00e4st Bl\u00e4tter davon
|
||||||
@ -432,13 +416,11 @@ Woodcutting.Skills.TreeFeller.Other.On=[[GREEN]]{0}[[DARK_GREEN]] benutzte [[RED
|
|||||||
Woodcutting.Skills.TreeFeller.Splinter=Deine Axt zersplittert in tausend kleine Teile!
|
Woodcutting.Skills.TreeFeller.Splinter=Deine Axt zersplittert in tausend kleine Teile!
|
||||||
Woodcutting.Skills.TreeFeller.Threshold=Dieser Baum ist zu gro\u00DF!
|
Woodcutting.Skills.TreeFeller.Threshold=Dieser Baum ist zu gro\u00DF!
|
||||||
Woodcutting.Skillup=Holzf\u00e4ller Skill um {0} gestiegen. Gesamt ({1})
|
Woodcutting.Skillup=Holzf\u00e4ller Skill um {0} gestiegen. Gesamt ({1})
|
||||||
|
|
||||||
#ABILITIY
|
#ABILITIY
|
||||||
##generic
|
##generic
|
||||||
Ability.Generic.Refresh=[[GREEN]]**F\u00e4higkeit wieder BEREIT!**
|
Ability.Generic.Refresh=[[GREEN]]**F\u00e4higkeit wieder BEREIT!**
|
||||||
Ability.Generic.Template.Lock=[[GRAY]]{0}
|
Ability.Generic.Template.Lock=[[GRAY]]{0}
|
||||||
Ability.Generic.Template=[[GOLD]]{0}: [[DARK_AQUA]]{1}
|
Ability.Generic.Template=[[GOLD]]{0}: [[DARK_AQUA]]{1}
|
||||||
|
|
||||||
#COMBAT
|
#COMBAT
|
||||||
Combat.ArrowDeflect=[[WHITE]]**Pfeil ABGELENKT**
|
Combat.ArrowDeflect=[[WHITE]]**Pfeil ABGELENKT**
|
||||||
Combat.BeastLore=[[GREEN]]**BESTIENKUNDE**
|
Combat.BeastLore=[[GREEN]]**BESTIENKUNDE**
|
||||||
@ -448,7 +430,6 @@ Combat.Gore=[[GREEN]]**AUFGESCHLITZT**
|
|||||||
Combat.StruckByGore=**du wurdest AUFGESCHLITZT**
|
Combat.StruckByGore=**du wurdest AUFGESCHLITZT**
|
||||||
Combat.TargetDazed=Ziel wurde [[DARK_RED]]BET\u00c4UBT
|
Combat.TargetDazed=Ziel wurde [[DARK_RED]]BET\u00c4UBT
|
||||||
Combat.TouchedFuzzy=[[DARK_RED]]Ungl\u00fccklich ber\u00fchrt. Schwindelgef\u00fchl.
|
Combat.TouchedFuzzy=[[DARK_RED]]Ungl\u00fccklich ber\u00fchrt. Schwindelgef\u00fchl.
|
||||||
|
|
||||||
#COMMANDS
|
#COMMANDS
|
||||||
##generic
|
##generic
|
||||||
mcMMO.Description=[[DARK_AQUA]]\u00DCber das [[YELLOW]]mcMMO[[DARK_AQUA]] Projekt: [[GOLD]]mcMMO ist ein [[RED]]open source[[GOLD]] RPG mod der im Februar 2011,[[GOLD]]von [[BLUE]]com.gmail.nossr50[[GOLD]] erstellt wurde. Ziel ist es eine gute RPG Erfahrung zu vermitteln.,[[DARK_AQUA]]Tipps:,[[GOLD]] - [[GREEN]]Benutz [[RED]]/mcmmo help[[GREEN]] um Befehle zu sehen,[[GOLD]] - [[GREEN]]Tippe [[RED]]/SKILLNAME[[GREEN]] um detaillierte Skillinformationen zu sehen,[[DARK_AQUA]]Entwickler:,[[GOLD]] - [[GREEN]]com.gmail.nossr50 [[BLUE]](Gr\u00FCnder),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Projektleitung),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Entwickler),[[GOLD]] - [[GREEN]]bm01 [[BLUE]](Entwickler),[[GOLD]] - [[GREEN]]TfT_02 [[BLUE]](Entwickler),[[GOLD]] - [[GREEN]]Glitchfinder [[BLUE]](Entwickler),[[GOLD]] - [[GREEN]]t00thpick1 [[BLUE]](Entwickler),[[GOLD]] - [[GREEN]]lumis31 [[BLUE]](Deutsche \u00DCbersetzung), [[DARK_AQUA]]N\u00FCtzliche Links:,[[GOLD]] - [[GREEN]]https://github.com/mcMMO-Dev/mcMMO/issues[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,
|
mcMMO.Description=[[DARK_AQUA]]\u00DCber das [[YELLOW]]mcMMO[[DARK_AQUA]] Projekt: [[GOLD]]mcMMO ist ein [[RED]]open source[[GOLD]] RPG mod der im Februar 2011,[[GOLD]]von [[BLUE]]com.gmail.nossr50[[GOLD]] erstellt wurde. Ziel ist es eine gute RPG Erfahrung zu vermitteln.,[[DARK_AQUA]]Tipps:,[[GOLD]] - [[GREEN]]Benutz [[RED]]/mcmmo help[[GREEN]] um Befehle zu sehen,[[GOLD]] - [[GREEN]]Tippe [[RED]]/SKILLNAME[[GREEN]] um detaillierte Skillinformationen zu sehen,[[DARK_AQUA]]Entwickler:,[[GOLD]] - [[GREEN]]com.gmail.nossr50 [[BLUE]](Gr\u00FCnder),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Projektleitung),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Entwickler),[[GOLD]] - [[GREEN]]bm01 [[BLUE]](Entwickler),[[GOLD]] - [[GREEN]]TfT_02 [[BLUE]](Entwickler),[[GOLD]] - [[GREEN]]Glitchfinder [[BLUE]](Entwickler),[[GOLD]] - [[GREEN]]t00thpick1 [[BLUE]](Entwickler),[[GOLD]] - [[GREEN]]lumis31 [[BLUE]](Deutsche \u00DCbersetzung), [[DARK_AQUA]]N\u00FCtzliche Links:,[[GOLD]] - [[GREEN]]https://github.com/mcMMO-Dev/mcMMO/issues[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,
|
||||||
@ -606,7 +587,6 @@ Commands.Usage.XP=xp
|
|||||||
mcMMO.NoInvites=Du hast zurzeit keine Einladungen
|
mcMMO.NoInvites=Du hast zurzeit keine Einladungen
|
||||||
mcMMO.NoPermission=[[DARK_RED]]Unzureichende Berechtigungen.
|
mcMMO.NoPermission=[[DARK_RED]]Unzureichende Berechtigungen.
|
||||||
mcMMO.NoSkillNote=[[DARK_GRAY]]Wenn du keinen Zugriff auf einen Skill hast wird er hier nicht angezeigt.
|
mcMMO.NoSkillNote=[[DARK_GRAY]]Wenn du keinen Zugriff auf einen Skill hast wird er hier nicht angezeigt.
|
||||||
|
|
||||||
##party
|
##party
|
||||||
Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)
|
Party.Forbidden=[mcMMO] Parties not permitted on this world (See Permissions)
|
||||||
Party.Help.0=Proper usage is [[DARK_AQUA]]{0} <player> [password].
|
Party.Help.0=Proper usage is [[DARK_AQUA]]{0} <player> [password].
|
||||||
@ -683,7 +663,6 @@ Party.ItemShare.Category.Mining=Mining
|
|||||||
Party.ItemShare.Category.Herbalism=Herbalism
|
Party.ItemShare.Category.Herbalism=Herbalism
|
||||||
Party.ItemShare.Category.Woodcutting=Woodcutting
|
Party.ItemShare.Category.Woodcutting=Woodcutting
|
||||||
Party.ItemShare.Category.Misc=Misc
|
Party.ItemShare.Category.Misc=Misc
|
||||||
|
|
||||||
##xp
|
##xp
|
||||||
Commands.XPGain.Acrobatics=Fallen
|
Commands.XPGain.Acrobatics=Fallen
|
||||||
Commands.XPGain.Alchemy=Tr\u00E4nke brauen
|
Commands.XPGain.Alchemy=Tr\u00E4nke brauen
|
||||||
@ -710,7 +689,6 @@ Commands.xprate.proper.2=Bitte spezifiziere mit true/false ob dies ein XP-Event
|
|||||||
Commands.xprate.started.0=[[GOLD]]Das XP EVENT f\u00fcr mcMMO hat BEGONNEN!
|
Commands.xprate.started.0=[[GOLD]]Das XP EVENT f\u00fcr mcMMO hat BEGONNEN!
|
||||||
Commands.xprate.started.1=[[GOLD]]Die mcMMO XP RATE liegt nun bei {0}x!
|
Commands.xprate.started.1=[[GOLD]]Die mcMMO XP RATE liegt nun bei {0}x!
|
||||||
XPRate.Event=[[GOLD]]mcMMO hat gerade ein XP-RATE Event. Derzeitige XP Rate: {0}x!
|
XPRate.Event=[[GOLD]]mcMMO hat gerade ein XP-RATE Event. Derzeitige XP Rate: {0}x!
|
||||||
|
|
||||||
#EFFECTS
|
#EFFECTS
|
||||||
##generic
|
##generic
|
||||||
Effects.Effects=EFFEKTE
|
Effects.Effects=EFFEKTE
|
||||||
@ -718,19 +696,16 @@ Effects.Child=[[DARK_GRAY]]LVL: [[GREEN]]{0}
|
|||||||
Effects.Level=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]])
|
Effects.Level=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]])
|
||||||
Effects.Parent=[[GOLD]]{0} -
|
Effects.Parent=[[GOLD]]{0} -
|
||||||
Effects.Template=[[DARK_AQUA]]{0}: [[GREEN]]{1}
|
Effects.Template=[[DARK_AQUA]]{0}: [[GREEN]]{1}
|
||||||
|
|
||||||
#GUIDES
|
#GUIDES
|
||||||
Guides.Available=[[GRAY]]Anleitung f\u00FCr {0} vorhanden - tippe /{1} ? [Seite]
|
Guides.Available=[[GRAY]]Anleitung f\u00FCr {0} vorhanden - tippe /{1} ? [Seite]
|
||||||
Guides.Header=[[GOLD]]-=[[GREEN]]{0} Anleitung[[GOLD]]=-
|
Guides.Header=[[GOLD]]-=[[GREEN]]{0} Anleitung[[GOLD]]=-
|
||||||
Guides.Page.Invalid=Keine g\u00FCltige Seitenzahl!
|
Guides.Page.Invalid=Keine g\u00FCltige Seitenzahl!
|
||||||
Guides.Page.OutOfRange=Es gibt nur insgesamt {0} Seiten.
|
Guides.Page.OutOfRange=Es gibt nur insgesamt {0} Seiten.
|
||||||
Guides.Usage=Der Befehl ist /{0} ? [Seite]
|
Guides.Usage=Der Befehl ist /{0} ? [Seite]
|
||||||
|
|
||||||
##Acrobatics
|
##Acrobatics
|
||||||
Guides.Acrobatics.Section.0=[[DARK_AQUA]]\u00DCber Akrobatik:\n[[YELLOW]]Akrobatik ist die Kunst sich grazi\u00F6s fortzubewegen.\n[[YELLOW]]Fall- und Kampfschaden werden reduziert\n\n[[DARK_AQUA]]XP GAIN:\n[[YELLOW]]XP sammelst du indem du in K\u00E4mpfen\n[[YELLOW]]ausweichst, oder St\u00FCrze aus gro\u00DFen H\u00F6hen \u00FCberlebst.
|
Guides.Acrobatics.Section.0=[[DARK_AQUA]]\u00DCber Akrobatik:\n[[YELLOW]]Akrobatik ist die Kunst sich grazi\u00F6s fortzubewegen.\n[[YELLOW]]Fall- und Kampfschaden werden reduziert\n\n[[DARK_AQUA]]XP GAIN:\n[[YELLOW]]XP sammelst du indem du in K\u00E4mpfen\n[[YELLOW]]ausweichst, oder St\u00FCrze aus gro\u00DFen H\u00F6hen \u00FCberlebst.
|
||||||
Guides.Acrobatics.Section.1=[[DARK_AQUA]]Wie funktioniert Rollen?\n[[YELLOW]]Ab und zu rollst du beim Fallen ab und der Fallschaden wird\n[[YELLOW]]reduziert. Wenn du den Schleichen Knopf w\u00E4hrend dem Fallen\n[[YELLOW]]h\u00E4ltst, verdoppelt sich die Wahrscheinlichkeit abzurollen.\n[[YELLOW]]In dem Fall rollst du grazi\u00F6s ab.\n[[YELLOW]]Grazi\u00F6se Rollen sind gleich wie normale Rollen, nur dass\n[[YELLOW]]sie \u00F6fter passieren und damit mehr Schutz vor St\u00FCrzen\n[[YELLOW]]liefern.
|
Guides.Acrobatics.Section.1=[[DARK_AQUA]]Wie funktioniert Rollen?\n[[YELLOW]]Ab und zu rollst du beim Fallen ab und der Fallschaden wird\n[[YELLOW]]reduziert. Wenn du den Schleichen Knopf w\u00E4hrend dem Fallen\n[[YELLOW]]h\u00E4ltst, verdoppelt sich die Wahrscheinlichkeit abzurollen.\n[[YELLOW]]In dem Fall rollst du grazi\u00F6s ab.\n[[YELLOW]]Grazi\u00F6se Rollen sind gleich wie normale Rollen, nur dass\n[[YELLOW]]sie \u00F6fter passieren und damit mehr Schutz vor St\u00FCrzen\n[[YELLOW]]liefern.
|
||||||
Guides.Acrobatics.Section.2=[[DARK_AQUA]]Wie funktioniert Ausweichen?\n[[YELLOW]]Ausweichen ist eine passive F\u00E4higkeit\n[[YELLOW]]die ab und zu den Schaden in K\u00E4mpfen halbiert.\n[[YELLOW]]Die Wahrscheinlichkeit auszuweichen ist abh\u00E4ngig vom \n[[YELLOW]]Akrobatiklevel.
|
Guides.Acrobatics.Section.2=[[DARK_AQUA]]Wie funktioniert Ausweichen?\n[[YELLOW]]Ausweichen ist eine passive F\u00E4higkeit\n[[YELLOW]]die ab und zu den Schaden in K\u00E4mpfen halbiert.\n[[YELLOW]]Die Wahrscheinlichkeit auszuweichen ist abh\u00E4ngig vom \n[[YELLOW]]Akrobatiklevel.
|
||||||
|
|
||||||
##Alchemy
|
##Alchemy
|
||||||
Guides.Alchemy.Section.0=[[DARK_AQUA]]\u00DCber Alchemie:\n[[YELLOW]]In Alchemie musst du Tr\u00E4nke brauen.\n[[YELLOW]]Mit h\u00F6herem Level werden die Tr\u00E4nke schneller\n[[YELLOW]]gebraut und neue Zutaten f\u00FCr zun\u00E4chst unerh\u00E4ltliche Tr\u00E4nke \n[[YELLOW]]freigeschaltet.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Tr\u00E4nke brauen.
|
Guides.Alchemy.Section.0=[[DARK_AQUA]]\u00DCber Alchemie:\n[[YELLOW]]In Alchemie musst du Tr\u00E4nke brauen.\n[[YELLOW]]Mit h\u00F6herem Level werden die Tr\u00E4nke schneller\n[[YELLOW]]gebraut und neue Zutaten f\u00FCr zun\u00E4chst unerh\u00E4ltliche Tr\u00E4nke \n[[YELLOW]]freigeschaltet.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Tr\u00E4nke brauen.
|
||||||
Guides.Alchemy.Section.1=[[DARK_AQUA]]Wie funktioniert Katalyse?\n[[YELLOW]]Katalyse beschleunigt das Brauen von Tr\u00E4nken bis\n[[YELLOW]]zu 4-facher Geschwindigkeit bei Level 1000.\n[[YELLOW]]
|
Guides.Alchemy.Section.1=[[DARK_AQUA]]Wie funktioniert Katalyse?\n[[YELLOW]]Katalyse beschleunigt das Brauen von Tr\u00E4nken bis\n[[YELLOW]]zu 4-facher Geschwindigkeit bei Level 1000.\n[[YELLOW]]
|
||||||
@ -739,14 +714,12 @@ Guides.Alchemy.Section.3=[[DARK_AQUA]]Braukunst Tier 1 Zutaten:\n[[YELLOW]]Lohne
|
|||||||
Guides.Alchemy.Section.4=[[DARK_AQUA]]Braukunst Tier 2 Zutaten:\n[[YELLOW]]Karotte (Eile)\n[[YELLOW]]Schleimball (Langsamkeit)\n\n[[DARK_AQUA]]Braukunst Tier 3 Zutaten:\n[[YELLOW]]Quarz (Absoption)\n[[YELLOW]]Roter Pilz (Springen)
|
Guides.Alchemy.Section.4=[[DARK_AQUA]]Braukunst Tier 2 Zutaten:\n[[YELLOW]]Karotte (Eile)\n[[YELLOW]]Schleimball (Langsamkeit)\n\n[[DARK_AQUA]]Braukunst Tier 3 Zutaten:\n[[YELLOW]]Quarz (Absoption)\n[[YELLOW]]Roter Pilz (Springen)
|
||||||
Guides.Alchemy.Section.5=[[DARK_AQUA]]Braukunst Tier 4 Zutaten:\n[[YELLOW]]Apfel (Gesundheitsboost)\n[[YELLOW]]Verrottetes Fleisch (Hunger)\n\n[[DARK_AQUA]]Braukunst Tier 5 Zutaten:\n[[YELLOW]]Brauner Pilz(\u00DCbelkeit)\n[[YELLOW]]Tintensack (Blindheit)
|
Guides.Alchemy.Section.5=[[DARK_AQUA]]Braukunst Tier 4 Zutaten:\n[[YELLOW]]Apfel (Gesundheitsboost)\n[[YELLOW]]Verrottetes Fleisch (Hunger)\n\n[[DARK_AQUA]]Braukunst Tier 5 Zutaten:\n[[YELLOW]]Brauner Pilz(\u00DCbelkeit)\n[[YELLOW]]Tintensack (Blindheit)
|
||||||
Guides.Alchemy.Section.6=[[DARK_AQUA]]Braukunst Tier 6 Zutaten:\n[[YELLOW]]Gras (S\u00E4ttigung)\n\n[[DARK_AQUA]]Braukunst Tier 7 Zutaten:\n[[YELLOW]]Giftige Kartoffel(Verwesung)\n\n[[DARK_AQUA]]Braukunst Tier 8 Zutaten:\n[[YELLOW]]Normaler Goldener Apfel (Resistenz)
|
Guides.Alchemy.Section.6=[[DARK_AQUA]]Braukunst Tier 6 Zutaten:\n[[YELLOW]]Gras (S\u00E4ttigung)\n\n[[DARK_AQUA]]Braukunst Tier 7 Zutaten:\n[[YELLOW]]Giftige Kartoffel(Verwesung)\n\n[[DARK_AQUA]]Braukunst Tier 8 Zutaten:\n[[YELLOW]]Normaler Goldener Apfel (Resistenz)
|
||||||
|
|
||||||
##Archery
|
##Archery
|
||||||
Guides.Archery.Section.0=[[DARK_AQUA]]\u00DCber Bogenschie\u00DFen:\n[[YELLOW]]In Bogenschie\u00DFen geht es um die Verwendung von Pfeil und\n[[YELLOW]]Bogen.\n\n[[YELLOW]]Es gibt unterschiedliche Kampfboni, wie Zusatzschaden,\n[[YELLOW]]der mit dem Level steigt und der F\u00E4higkeit Feinde im PVP\n[[YELLOW]]zu bet\u00E4uben. Zus\u00E4tzlich kannst du einige verschossene\n[[YELLOW]]Pfeile aus den Leichen deiner Feinde wiedergewinnen.
|
Guides.Archery.Section.0=[[DARK_AQUA]]\u00DCber Bogenschie\u00DFen:\n[[YELLOW]]In Bogenschie\u00DFen geht es um die Verwendung von Pfeil und\n[[YELLOW]]Bogen.\n\n[[YELLOW]]Es gibt unterschiedliche Kampfboni, wie Zusatzschaden,\n[[YELLOW]]der mit dem Level steigt und der F\u00E4higkeit Feinde im PVP\n[[YELLOW]]zu bet\u00E4uben. Zus\u00E4tzlich kannst du einige verschossene\n[[YELLOW]]Pfeile aus den Leichen deiner Feinde wiedergewinnen.
|
||||||
Guides.Archery.Section.1=[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]XP erh\u00E4ltst du durch das Abschie\u00DFen von Monstern und\n[[YELLOW]]anderen Spielern.
|
Guides.Archery.Section.1=[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]XP erh\u00E4ltst du durch das Abschie\u00DFen von Monstern und\n[[YELLOW]]anderen Spielern.
|
||||||
Guides.Archery.Section.2=[[DARK_AQUA]]Wie funktioniert der Kunstschuss?\n[[YELLOW]]Kunstschuss erh\u00F6ht den Schaden deines Schusses.\n[[YELLOW]]Der Zusatzschaden steigt mit deinem Bogen Level.\n[[YELLOW]]In den Standardeinstellungen steigt der Schaden um 10%\n[[YELLOW]]alle 50 Level, mit einem Maximum von 200% extra.
|
Guides.Archery.Section.2=[[DARK_AQUA]]Wie funktioniert der Kunstschuss?\n[[YELLOW]]Kunstschuss erh\u00F6ht den Schaden deines Schusses.\n[[YELLOW]]Der Zusatzschaden steigt mit deinem Bogen Level.\n[[YELLOW]]In den Standardeinstellungen steigt der Schaden um 10%\n[[YELLOW]]alle 50 Level, mit einem Maximum von 200% extra.
|
||||||
Guides.Archery.Section.3=[[DARK_AQUA]]Wie Funktioniert Bet\u00E4ubung?\n[[YELLOW]]Du hast eine passive Wahrscheinlichkeit andere Spieler\n[[YELLOW]]zu bet\u00E4uben wenn du sie anschie\u00DFt. Der Spieler wird\n[[YELLOW]]gezwungen f\u00FCr eine kurze Weile senkrecht nach oben zu\n[[YELLOW]]schauen.\n[[YELLOW]]Ein Bet\u00E4ubungsschuss f\u00FCgt au\u00DFerdem 4 Schadenspunkte \n[[YELLOW]](2 Herzen) extra zu.
|
Guides.Archery.Section.3=[[DARK_AQUA]]Wie Funktioniert Bet\u00E4ubung?\n[[YELLOW]]Du hast eine passive Wahrscheinlichkeit andere Spieler\n[[YELLOW]]zu bet\u00E4uben wenn du sie anschie\u00DFt. Der Spieler wird\n[[YELLOW]]gezwungen f\u00FCr eine kurze Weile senkrecht nach oben zu\n[[YELLOW]]schauen.\n[[YELLOW]]Ein Bet\u00E4ubungsschuss f\u00FCgt au\u00DFerdem 4 Schadenspunkte \n[[YELLOW]](2 Herzen) extra zu.
|
||||||
Guides.Archery.Section.4=[[DARK_AQUA]]Wie funktioniert die Pfeilr\u00FCckgewinnung?\n[[YELLOW]]Du hast eine passive Wahrscheinlichkeit einige Pfeile\n[[YELLOW]]zur\u00FCckzubekommen wenn du Monster mit dem Bogen t\u00F6test.\n[[YELLOW]]Die Wahrscheinlichkeit steigt mit dem Bogen Level.\n[[YELLOW]]Standardm\u00E4\u00DFig steigt diese F\u00E4higkeit um 0.1% pro Level, bis\n[[YELLOW]]100% bei Level 1000.
|
Guides.Archery.Section.4=[[DARK_AQUA]]Wie funktioniert die Pfeilr\u00FCckgewinnung?\n[[YELLOW]]Du hast eine passive Wahrscheinlichkeit einige Pfeile\n[[YELLOW]]zur\u00FCckzubekommen wenn du Monster mit dem Bogen t\u00F6test.\n[[YELLOW]]Die Wahrscheinlichkeit steigt mit dem Bogen Level.\n[[YELLOW]]Standardm\u00E4\u00DFig steigt diese F\u00E4higkeit um 0.1% pro Level, bis\n[[YELLOW]]100% bei Level 1000.
|
||||||
|
|
||||||
##Axes
|
##Axes
|
||||||
Guides.Axes.Section.0=[[DARK_AQUA]]\u00DCber Axt:\n[[YELLOW]]Mit dem Axt Skill kannst du die Axt f\u00FCr viel mehr als\n[[YELLOW]]nur abholzen verwenden! Du kannst Monster und Spieler\n[[YELLOW]]sprichw\u00F6rtlich weghacken und ihnen t\u00F6dliche\n[[YELLOW]]Schl\u00E4ge verpassen oder sie zur\u00FCckweichen lassen\n[[YELLOW]]Deine Axt zerst\u00F6rt au\u00DFerdem sehr gut R\u00FCstungen,\n[[YELLOW]]was mit h\u00F6herem Level noch mehr ansteigt.
|
Guides.Axes.Section.0=[[DARK_AQUA]]\u00DCber Axt:\n[[YELLOW]]Mit dem Axt Skill kannst du die Axt f\u00FCr viel mehr als\n[[YELLOW]]nur abholzen verwenden! Du kannst Monster und Spieler\n[[YELLOW]]sprichw\u00F6rtlich weghacken und ihnen t\u00F6dliche\n[[YELLOW]]Schl\u00E4ge verpassen oder sie zur\u00FCckweichen lassen\n[[YELLOW]]Deine Axt zerst\u00F6rt au\u00DFerdem sehr gut R\u00FCstungen,\n[[YELLOW]]was mit h\u00F6herem Level noch mehr ansteigt.
|
||||||
Guides.Axes.Section.1=[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Um XP zu bekommen musst du Spieler oder Monster \n[[YELLOW]]mit einer Axt schlagen.
|
Guides.Axes.Section.1=[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Um XP zu bekommen musst du Spieler oder Monster \n[[YELLOW]]mit einer Axt schlagen.
|
||||||
@ -755,7 +728,6 @@ Guides.Axes.Section.3=[[DARK_AQUA]]Wie funktionieren kritische Treffer?\n[[YELLO
|
|||||||
Guides.Axes.Section.4=[[DARK_AQUA]]Wie funktioniert die Axt-Beherrschung?\n[[YELLOW]]Axt Beherrschung ist eine passive F\u00E4higkeit die deinen\n[[YELLOW]]Axt-Schl\u00E4gen Zusatzschaden hinzuf\u00FCgt.\n[[YELLOW]]Standardm\u00E4\u00DFig steigt der Schaden um 1 alle 50 Level,\n[[YELLOW]]maximal auf 4 Extraschaden bei Level 200.
|
Guides.Axes.Section.4=[[DARK_AQUA]]Wie funktioniert die Axt-Beherrschung?\n[[YELLOW]]Axt Beherrschung ist eine passive F\u00E4higkeit die deinen\n[[YELLOW]]Axt-Schl\u00E4gen Zusatzschaden hinzuf\u00FCgt.\n[[YELLOW]]Standardm\u00E4\u00DFig steigt der Schaden um 1 alle 50 Level,\n[[YELLOW]]maximal auf 4 Extraschaden bei Level 200.
|
||||||
Guides.Axes.Section.5=[[DARK_AQUA]]Wie funktioniert Wucht?\n[[YELLOW]]Schlage m\u00E4chtig zu und zerst\u00F6re R\u00FCstungen!\n[[YELLOW]]Wucht hat eine passive Wahrscheinlichkeit gegnerische\n[[YELLOW]]R\u00FCstung zu besch\u00E4digen. Dieser Schaden steigt mit deinem Axt\n[[YELLOW]]Level.
|
Guides.Axes.Section.5=[[DARK_AQUA]]Wie funktioniert Wucht?\n[[YELLOW]]Schlage m\u00E4chtig zu und zerst\u00F6re R\u00FCstungen!\n[[YELLOW]]Wucht hat eine passive Wahrscheinlichkeit gegnerische\n[[YELLOW]]R\u00FCstung zu besch\u00E4digen. Dieser Schaden steigt mit deinem Axt\n[[YELLOW]]Level.
|
||||||
Guides.Axes.Section.6=[[DARK_AQUA]]Wie funktioniert der Wucht-Schlag?\n[[YELLOW]]Du hast eine passive Chance Monster und\n[[YELLOW]]Spieler beim Schlag zur\u00FCckweichen zu lassen\n[[YELLOW]]Standardm\u00E4\u00DFig ist die Wahrscheinlichkeit 25%\n[[YELLOW]]Zus\u00E4tzlich f\u00FCgst du Zusatzschaden zu.
|
Guides.Axes.Section.6=[[DARK_AQUA]]Wie funktioniert der Wucht-Schlag?\n[[YELLOW]]Du hast eine passive Chance Monster und\n[[YELLOW]]Spieler beim Schlag zur\u00FCckweichen zu lassen\n[[YELLOW]]Standardm\u00E4\u00DFig ist die Wahrscheinlichkeit 25%\n[[YELLOW]]Zus\u00E4tzlich f\u00FCgst du Zusatzschaden zu.
|
||||||
|
|
||||||
##Excavation
|
##Excavation
|
||||||
Guides.Excavation.Section.0=[[DARK_AQUA]]\u00DCber Graben:\n[[YELLOW]]Graben ist die F\u00E4higkeit Sch\u00E4tze im Dreck zu finden.\n[[YELLOW]]Durch Aufgraben des Landes wirst du Sch\u00E4tze finden\n[[YELLOW]]Je l\u00E4nger du das tust, desto mehr Sch\u00E4tze findest du.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]XP erh\u00E4ltst du durch Schaufeln.\n[[YELLOW]]Nur bestimmte Materialen geben XP und Sch\u00E4tze.
|
Guides.Excavation.Section.0=[[DARK_AQUA]]\u00DCber Graben:\n[[YELLOW]]Graben ist die F\u00E4higkeit Sch\u00E4tze im Dreck zu finden.\n[[YELLOW]]Durch Aufgraben des Landes wirst du Sch\u00E4tze finden\n[[YELLOW]]Je l\u00E4nger du das tust, desto mehr Sch\u00E4tze findest du.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]XP erh\u00E4ltst du durch Schaufeln.\n[[YELLOW]]Nur bestimmte Materialen geben XP und Sch\u00E4tze.
|
||||||
Guides.Excavation.Section.1=[[DARK_AQUA]]Kompatible Materialien:\n[[YELLOW]]Gras, Erde, Sand, Lehm, Kies, Myzel, Seelensand, Schnee
|
Guides.Excavation.Section.1=[[DARK_AQUA]]Kompatible Materialien:\n[[YELLOW]]Gras, Erde, Sand, Lehm, Kies, Myzel, Seelensand, Schnee
|
||||||
@ -764,7 +736,6 @@ Guides.Excavation.Section.3=[[DARK_AQUA]]Was ist der Giga Bohrer?\n[[YELLOW]]Gig
|
|||||||
Guides.Excavation.Section.4=[[DARK_AQUA]]Wie funktioniert der Schatz J\u00E4ger?\n[[YELLOW]]Jeder m\u00F6gliche Schatz hat seine eigene Level Voraussetzung\n[[YELLOW]]um zu erscheinen, folglich ist es schwer[[YELLOW]]zu sagen inwiefern es \n[[YELLOW]]dir hilft ein höheres Level zu haben.\n[[YELLOW]]Je h\u00F6her das Level, desto mehr Sch\u00E4tze k\u00F6nnen gefunden\n[[YELLOW]]werden.
|
Guides.Excavation.Section.4=[[DARK_AQUA]]Wie funktioniert der Schatz J\u00E4ger?\n[[YELLOW]]Jeder m\u00F6gliche Schatz hat seine eigene Level Voraussetzung\n[[YELLOW]]um zu erscheinen, folglich ist es schwer[[YELLOW]]zu sagen inwiefern es \n[[YELLOW]]dir hilft ein höheres Level zu haben.\n[[YELLOW]]Je h\u00F6her das Level, desto mehr Sch\u00E4tze k\u00F6nnen gefunden\n[[YELLOW]]werden.
|
||||||
Guides.Excavation.Section.5=Beachte au\u00DFerdem, dass jedes kompatible Material seine\n[[YELLOW]]eigenen einzigartigen Sch\u00E4tze hat.\n[[YELLOW]]Anders ausgedr\u00FCckt: Sch\u00E4tze die du in Kies findest\n[[YELLOW]]gibt es nicht zwingend in Erde.
|
Guides.Excavation.Section.5=Beachte au\u00DFerdem, dass jedes kompatible Material seine\n[[YELLOW]]eigenen einzigartigen Sch\u00E4tze hat.\n[[YELLOW]]Anders ausgedr\u00FCckt: Sch\u00E4tze die du in Kies findest\n[[YELLOW]]gibt es nicht zwingend in Erde.
|
||||||
Guides.Excavation.Section.6=[[DARK_AQUA]]Bemerkung zu Graben:\n[[YELLOW]]Graben Drops sind vollkommen anpassbar\n[[YELLOW]]Ergebnisse unterscheiden sich deshalb von Server zu Server.
|
Guides.Excavation.Section.6=[[DARK_AQUA]]Bemerkung zu Graben:\n[[YELLOW]]Graben Drops sind vollkommen anpassbar\n[[YELLOW]]Ergebnisse unterscheiden sich deshalb von Server zu Server.
|
||||||
|
|
||||||
##Fishing
|
##Fishing
|
||||||
Guides.Fishing.Section.0=[[DARK_AQUA]]\u00DCber Angeln:\n[[YELLOW]]Mit dem Angeln Skill ist Angeln wieder aufregend!\n[[YELLOW]]Finde versteckte Sch\u00E4tze oder Rei\u00DFe Items von Monstern.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Fang Fische.
|
Guides.Fishing.Section.0=[[DARK_AQUA]]\u00DCber Angeln:\n[[YELLOW]]Mit dem Angeln Skill ist Angeln wieder aufregend!\n[[YELLOW]]Finde versteckte Sch\u00E4tze oder Rei\u00DFe Items von Monstern.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Fang Fische.
|
||||||
Guides.Fishing.Section.1=[[DARK_AQUA]]Wie funktioniert der Schatz J\u00E4ger?\n[[YELLOW]]Mit dieser F\u00E4higkeit kannst du beim Angeln Sch\u00E4tze finden.\n[[YELLOW]]Diese k\u00F6nnen sogar verzaubert sein!\n[[YELLOW]]Jeder m\u00F6gliche Schatz kann mit jedem Level gefunden\n[[YELLOW]]werden. Die H\u00E4ufigkeit h\u00E4ngt von dem Wert des Items ab.\n[[YELLOW]]Je h\u00F6her der Angeln Skill ist, desto einfacher wird es\n[[YELLOW]]wertvolle Sch\u00E4tze zu finden.
|
Guides.Fishing.Section.1=[[DARK_AQUA]]Wie funktioniert der Schatz J\u00E4ger?\n[[YELLOW]]Mit dieser F\u00E4higkeit kannst du beim Angeln Sch\u00E4tze finden.\n[[YELLOW]]Diese k\u00F6nnen sogar verzaubert sein!\n[[YELLOW]]Jeder m\u00F6gliche Schatz kann mit jedem Level gefunden\n[[YELLOW]]werden. Die H\u00E4ufigkeit h\u00E4ngt von dem Wert des Items ab.\n[[YELLOW]]Je h\u00F6her der Angeln Skill ist, desto einfacher wird es\n[[YELLOW]]wertvolle Sch\u00E4tze zu finden.
|
||||||
@ -773,7 +744,6 @@ Guides.Fishing.Section.3=[[DARK_AQUA]]Wie funktioniert die Profiangel?\n[[YELLOW
|
|||||||
Guides.Fishing.Section.4=[[DARK_AQUA]]Wie funktioniert Rei\u00DFen?\n[[YELLOW]]Diese F\u00E4higkeit erm\u00F6glich es Monstern Items zu entrei\u00DFen,\n[[YELLOW]]indem du sie an deine Angel h\u00E4ngst. \n[[YELLOW]]Die Monster lassen das Item, das sie normalerweise beim Tod\n[[YELLOW]]fallen lassen fallen.\n[[YELLOW]]Au\u00DFerdem gibt es eine kleine Wahrscheinlichkeit Monstersch\u00E4del\n[[YELLOW]]zu bekommen.
|
Guides.Fishing.Section.4=[[DARK_AQUA]]Wie funktioniert Rei\u00DFen?\n[[YELLOW]]Diese F\u00E4higkeit erm\u00F6glich es Monstern Items zu entrei\u00DFen,\n[[YELLOW]]indem du sie an deine Angel h\u00E4ngst. \n[[YELLOW]]Die Monster lassen das Item, das sie normalerweise beim Tod\n[[YELLOW]]fallen lassen fallen.\n[[YELLOW]]Au\u00DFerdem gibt es eine kleine Wahrscheinlichkeit Monstersch\u00E4del\n[[YELLOW]]zu bekommen.
|
||||||
Guides.Fishing.Section.5=[[DARK_AQUA]]Wie funktioniert die Fischer-Mahlzeit?\n[[YELLOW]]Du wirst beim Essen von Fisch besser satt.
|
Guides.Fishing.Section.5=[[DARK_AQUA]]Wie funktioniert die Fischer-Mahlzeit?\n[[YELLOW]]Du wirst beim Essen von Fisch besser satt.
|
||||||
Guides.Fishing.Section.6=[[DARK_AQUA]]Bemerkung zum Angeln:\n[[YELLOW]]Angeln Drops sind vollkommen anpassbar.\n[[YELLOW]]Ergebnisse unterscheiden sich deshalb von Server zu Server.
|
Guides.Fishing.Section.6=[[DARK_AQUA]]Bemerkung zum Angeln:\n[[YELLOW]]Angeln Drops sind vollkommen anpassbar.\n[[YELLOW]]Ergebnisse unterscheiden sich deshalb von Server zu Server.
|
||||||
|
|
||||||
##Herbalism
|
##Herbalism
|
||||||
Guides.Herbalism.Section.0=[[DARK_AQUA]]\u00DCber Pflanzenkunde\n[[YELLOW]]In Pflanzenkunde geht es um das Ernten.\n\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Ernte Pflanzen.
|
Guides.Herbalism.Section.0=[[DARK_AQUA]]\u00DCber Pflanzenkunde\n[[YELLOW]]In Pflanzenkunde geht es um das Ernten.\n\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Ernte Pflanzen.
|
||||||
Guides.Herbalism.Section.1=[[DARK_AQUA]]Kompatible Blocks\n[[YELLOW]]Weizen, Kartoffeln, Karotten, Melonen, K\u00FCrbisse,\n[[YELLOW]]Zuckerrohr, Kakaobohnen, Blumen, Kakteen,\n[[YELLOW]]Pilze, Netherwarzen, Seerosen und Ranken.
|
Guides.Herbalism.Section.1=[[DARK_AQUA]]Kompatible Blocks\n[[YELLOW]]Weizen, Kartoffeln, Karotten, Melonen, K\u00FCrbisse,\n[[YELLOW]]Zuckerrohr, Kakaobohnen, Blumen, Kakteen,\n[[YELLOW]]Pilze, Netherwarzen, Seerosen und Ranken.
|
||||||
@ -783,7 +753,6 @@ Guides.Herbalism.Section.4=[[DARK_AQUA]]Wie funktioniert der Gr\u00FCne Daumen(B
|
|||||||
Guides.Herbalism.Section.5=[[DARK_AQUA]]Wie funktioniert das Bauernfr\u00FChst\u00FCck?\n[[YELLOW]]Du wirst beim Essen von Brot, Keksen, Melonen, Pilzsuppe,\n[[YELLOW]]Karotten und Kartoffeln satter.
|
Guides.Herbalism.Section.5=[[DARK_AQUA]]Wie funktioniert das Bauernfr\u00FChst\u00FCck?\n[[YELLOW]]Du wirst beim Essen von Brot, Keksen, Melonen, Pilzsuppe,\n[[YELLOW]]Karotten und Kartoffeln satter.
|
||||||
Guides.Herbalism.Section.6=[[DARK_AQUA]]Wie funktioniert Hylians Gl\u00FCck?\n[[YELLOW]]Diese passive F\u00E4higkeit gibt dir eine Chance Items zu finden\n[[YELLOW]]wenn du bestimmte Bl\u00F6cke mit dem Schwert abbaust.
|
Guides.Herbalism.Section.6=[[DARK_AQUA]]Wie funktioniert Hylians Gl\u00FCck?\n[[YELLOW]]Diese passive F\u00E4higkeit gibt dir eine Chance Items zu finden\n[[YELLOW]]wenn du bestimmte Bl\u00F6cke mit dem Schwert abbaust.
|
||||||
Guides.Herbalism.Section.7=[[DARK_AQUA]]Wie funktionieren Doppeldrops?\n[[YELLOW]]Du erh\u00E4ltst beim Ernten mehr Ertrag.
|
Guides.Herbalism.Section.7=[[DARK_AQUA]]Wie funktionieren Doppeldrops?\n[[YELLOW]]Du erh\u00E4ltst beim Ernten mehr Ertrag.
|
||||||
|
|
||||||
##Mining
|
##Mining
|
||||||
Guides.Mining.Section.0=[[DARK_AQUA]]\u00DCber Bergbau:\n[[YELLOW]]Im Bergbau musst du Steine und Erze sammeln. Du erh\u00E4ltst\n[[YELLOW]]ab und zu zus\u00E4tzliche Drops.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Um Erfahrung zu sammeln musst du mit der Spitzhacke abbauen.\n[[YELLOW]]Nur bestimmte Blocks geben XP.
|
Guides.Mining.Section.0=[[DARK_AQUA]]\u00DCber Bergbau:\n[[YELLOW]]Im Bergbau musst du Steine und Erze sammeln. Du erh\u00E4ltst\n[[YELLOW]]ab und zu zus\u00E4tzliche Drops.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Um Erfahrung zu sammeln musst du mit der Spitzhacke abbauen.\n[[YELLOW]]Nur bestimmte Blocks geben XP.
|
||||||
Guides.Mining.Section.1=[[DARK_AQUA]]Kompatible Materialien:\n[[YELLOW]]Stein, Kohleerz, Eisenerz, Golderz, Diamanterz, Redstoneerz,\n[[YELLOW]]Lapiserz, Obsidian, Bemooster Bruchstein, Endstein,\n[[YELLOW]]Glowstone, und Netherrack.
|
Guides.Mining.Section.1=[[DARK_AQUA]]Kompatible Materialien:\n[[YELLOW]]Stein, Kohleerz, Eisenerz, Golderz, Diamanterz, Redstoneerz,\n[[YELLOW]]Lapiserz, Obsidian, Bemooster Bruchstein, Endstein,\n[[YELLOW]]Glowstone, und Netherrack.
|
||||||
@ -791,31 +760,26 @@ Guides.Mining.Section.2=[[DARK_AQUA]]Wie funktioniert Super-Brecher?:\n[[YELLOW]
|
|||||||
Guides.Mining.Section.3=[[DARK_AQUA]]Was ist Super-Brecher?\n[[YELLOW]]Super-Brecher ist eine F\u00E4higkeit deren Dauer\n[[YELLOW]]vom Bergbau Skill abh\u00E4ngt. Es verdreifacht die \n[[YELLOW]]Wahrscheinlichkeit Sch\u00E4tze zu finden und erm\u00F6glicht\n[[YELLOW]]sofortiges Abbauen kompatibler Materialien.
|
Guides.Mining.Section.3=[[DARK_AQUA]]Was ist Super-Brecher?\n[[YELLOW]]Super-Brecher ist eine F\u00E4higkeit deren Dauer\n[[YELLOW]]vom Bergbau Skill abh\u00E4ngt. Es verdreifacht die \n[[YELLOW]]Wahrscheinlichkeit Sch\u00E4tze zu finden und erm\u00F6glicht\n[[YELLOW]]sofortiges Abbauen kompatibler Materialien.
|
||||||
Guides.Mining.Section.4=[[DARK_AQUA]]Wie benutzt man Z\u00FCndstoff?:\n[[YELLOW]]Halte ein Feuerzeug in der Hand, b\u00FCck dich und klicke aus\n[[YELLOW]]sicherer Entfernung mit der rechten Maustaste auf das TNT.\n[[YELLOW]]Das TNT wird sofort explodieren.
|
Guides.Mining.Section.4=[[DARK_AQUA]]Wie benutzt man Z\u00FCndstoff?:\n[[YELLOW]]Halte ein Feuerzeug in der Hand, b\u00FCck dich und klicke aus\n[[YELLOW]]sicherer Entfernung mit der rechten Maustaste auf das TNT.\n[[YELLOW]]Das TNT wird sofort explodieren.
|
||||||
Guides.Mining.Section.5=[[DARK_AQUA]]Wie funktioniert Z\u00FCndstoff?\n[[YELLOW]]Z\u00FCndstoff ist eine F\u00E4higkeit mit einer Abklingzeit, deren St\u00E4rke\n[[YELLOW]]vom Level abh\u00E4ngt. Sie erlaubt dir beim Abbauen mit TNT dieses\n[[YELLOW]]aus der Ferne zu z\u00FCnden. Z\u00FCndstoff besteht aus 3 Teilen.\n[[YELLOW]]Erstens dem Sprengmeister mit gr\u00F6\u00DFeren Explosionen\n[[YELLOW]]Zweitens dem Explosions-Experten, der Schaden von TNT\n[[YELLOW]]reduziert.\n[[YELLOW]]Die dritte F\u00E4higkeit erh\u00F6ht einfach den Erzertrag und\n[[YELLOW]]und reduziert den Schutt.
|
Guides.Mining.Section.5=[[DARK_AQUA]]Wie funktioniert Z\u00FCndstoff?\n[[YELLOW]]Z\u00FCndstoff ist eine F\u00E4higkeit mit einer Abklingzeit, deren St\u00E4rke\n[[YELLOW]]vom Level abh\u00E4ngt. Sie erlaubt dir beim Abbauen mit TNT dieses\n[[YELLOW]]aus der Ferne zu z\u00FCnden. Z\u00FCndstoff besteht aus 3 Teilen.\n[[YELLOW]]Erstens dem Sprengmeister mit gr\u00F6\u00DFeren Explosionen\n[[YELLOW]]Zweitens dem Explosions-Experten, der Schaden von TNT\n[[YELLOW]]reduziert.\n[[YELLOW]]Die dritte F\u00E4higkeit erh\u00F6ht einfach den Erzertrag und\n[[YELLOW]]und reduziert den Schutt.
|
||||||
|
|
||||||
##Repair
|
##Repair
|
||||||
Guides.Repair.Section.0=[[DARK_AQUA]]\u00DCber Reparatur:\n[[YELLOW]]Reparatur erlaub dir an einem Eisenblock Werkzeuge und\n[[YELLOW]]Waffen zu reparieren.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Repariere Werkzeuge am Eisenblockamboss\n[[RED]]Achtung: [[YELLOW]]Das ist nicht der normale Minecraft Amboss!
|
Guides.Repair.Section.0=[[DARK_AQUA]]\u00DCber Reparatur:\n[[YELLOW]]Reparatur erlaub dir an einem Eisenblock Werkzeuge und\n[[YELLOW]]Waffen zu reparieren.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Repariere Werkzeuge am Eisenblockamboss\n[[RED]]Achtung: [[YELLOW]]Das ist nicht der normale Minecraft Amboss!
|
||||||
Guides.Repair.Section.1=[[DARK_AQUA]]Wie kann ich Reparatur verwenden?\n[[YELLOW]]Platziere einen mcMMO Amboss, halte das zu reparierende Item\n[[YELLOW]]in der Hand und klicke mit der rechten Maustaste auf ihn. Zum\n[[YELLOW]]Reparieren benötigst du die Ausgangsmaterialien im Inventar,\n[[YELLOW]]diese werden dir im Zuge der Reparatur abgezogen.
|
Guides.Repair.Section.1=[[DARK_AQUA]]Wie kann ich Reparatur verwenden?\n[[YELLOW]]Platziere einen mcMMO Amboss, halte das zu reparierende Item\n[[YELLOW]]in der Hand und klicke mit der rechten Maustaste auf ihn. Zum\n[[YELLOW]]Reparieren benötigst du die Ausgangsmaterialien im Inventar,\n[[YELLOW]]diese werden dir im Zuge der Reparatur abgezogen.
|
||||||
Guides.Repair.Section.2=[[DARK_AQUA]]Wie funktioniert der Reparatur Meister?\n[[YELLOW]]Mit dem Reparatur Meister wird dein Werkzeug ein bisschen\n[[YELLOW]]besser als normalerweise repariert.\n[[YELLOW]]Der Bonus ist abh\u00E4ngig vom Reparatur Level.
|
Guides.Repair.Section.2=[[DARK_AQUA]]Wie funktioniert der Reparatur Meister?\n[[YELLOW]]Mit dem Reparatur Meister wird dein Werkzeug ein bisschen\n[[YELLOW]]besser als normalerweise repariert.\n[[YELLOW]]Der Bonus ist abh\u00E4ngig vom Reparatur Level.
|
||||||
Guides.Repair.Section.3=[[DARK_AQUA]]Wie funktioniert Super Reparatur?\n[[YELLOW]]Mit Super Reparatur werden ab und zu deine Items\n[[YELLOW]]doppelt so gut repariert.
|
Guides.Repair.Section.3=[[DARK_AQUA]]Wie funktioniert Super Reparatur?\n[[YELLOW]]Mit Super Reparatur werden ab und zu deine Items\n[[YELLOW]]doppelt so gut repariert.
|
||||||
Guides.Repair.Section.4=[[DARK_AQUA]]Wie funktioniert Arkanes Schmieden?\n[[YELLOW]]Diese F\u00E4higkeit erm\u00F6glicht dir mit einer gewissen\n[[YELLOW]]Wahrscheinlichkeit Verzauberungen auf Items zu erhalten.\n[[YELLOW]]Verzauberungen k\u00F6nnen erhalten, vermindert werden oder\n[[YELLOW]]ganz verloren gehen.
|
Guides.Repair.Section.4=[[DARK_AQUA]]Wie funktioniert Arkanes Schmieden?\n[[YELLOW]]Diese F\u00E4higkeit erm\u00F6glicht dir mit einer gewissen\n[[YELLOW]]Wahrscheinlichkeit Verzauberungen auf Items zu erhalten.\n[[YELLOW]]Verzauberungen k\u00F6nnen erhalten, vermindert werden oder\n[[YELLOW]]ganz verloren gehen.
|
||||||
|
|
||||||
##Salvage
|
##Salvage
|
||||||
Guides.Salvage.Section.0=[[DARK_AQUA]]\u00DCber Verwerten:\n[[YELLOW]]Mit einem Goldamboss kannst du R\u00FCstungen und\n[[YELLOW]]Werkzeuge verwerten.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Verwerten ist ein vom Angeln und Reparieren abh\u00E4ngiger Skill\n[[YELLOW]]Sein Level ist die H\u00E4lfte von deren Summe.
|
Guides.Salvage.Section.0=[[DARK_AQUA]]\u00DCber Verwerten:\n[[YELLOW]]Mit einem Goldamboss kannst du R\u00FCstungen und\n[[YELLOW]]Werkzeuge verwerten.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Verwerten ist ein vom Angeln und Reparieren abh\u00E4ngiger Skill\n[[YELLOW]]Sein Level ist die H\u00E4lfte von deren Summe.
|
||||||
Guides.Salvage.Section.1=[[DARK_AQUA]]Wie funktioniert Verwerten?\n[[YELLOW]]Platziere einen Goldamboss und rechtsklicke mit dem Item in\n[[YELLOW]]der Hand. Das item wird zerst\u00F6rt und in seine\n[[YELLOW]]Bestandteile zerlegt.\n\n[[YELLOW]]Beispielsweise gibt eine Eisenaxt Eisenbarren.
|
Guides.Salvage.Section.1=[[DARK_AQUA]]Wie funktioniert Verwerten?\n[[YELLOW]]Platziere einen Goldamboss und rechtsklicke mit dem Item in\n[[YELLOW]]der Hand. Das item wird zerst\u00F6rt und in seine\n[[YELLOW]]Bestandteile zerlegt.\n\n[[YELLOW]]Beispielsweise gibt eine Eisenaxt Eisenbarren.
|
||||||
Guides.Salvage.Section.2=[[DARK_AQUA]]Wie funktioniert Fortgeschrittenes Verwerten?\n[[YELLOW]]Sobald freigeschaltet, kannst du besch\u00E4digte Items verwerten.\n[[YELLOW]]Der Ertrag steigt mit dem Level.\n[[YELLOW]]Der Mindestertrag ist immer 1 Item, ansonsten kannst du nicht\n[[YELLOW]]verwerten.
|
Guides.Salvage.Section.2=[[DARK_AQUA]]Wie funktioniert Fortgeschrittenes Verwerten?\n[[YELLOW]]Sobald freigeschaltet, kannst du besch\u00E4digte Items verwerten.\n[[YELLOW]]Der Ertrag steigt mit dem Level.\n[[YELLOW]]Der Mindestertrag ist immer 1 Item, ansonsten kannst du nicht\n[[YELLOW]]verwerten.
|
||||||
Guides.Salvage.Section.3=[[DARK_AQUA]]Zur Verbildlichung ein Beispiel:\n[[YELLOW]]Sagen wir verwerten eine Goldene Spitzhacke mit 80%\n[[YELLOW]]Haltbarkeit, bedeutet das, dass wir nur 2 Gold bekommen\n[[YELLOW]]k\u00F6nnen (Spitzhacke=3 Goldbarren, also jeder 33,33%\n[[YELLOW]]Haltbarkeit) was 66% entspricht. Wenn dein\n[[YELLOW]]Ertragsprozentsatz unter 66% liegt wirst du keine 2 Barren\n[[YELLOW]]bekommen k\u00F6nnen. Wenn sie dar\u00FCber ist, kannst du den\n[[YELLOW]]"gesamten Betrag" bekommen, der aus 2 Eisenbarren besteht.
|
Guides.Salvage.Section.3=[[DARK_AQUA]]Zur Verbildlichung ein Beispiel:\n[[YELLOW]]Sagen wir verwerten eine Goldene Spitzhacke mit 80%\n[[YELLOW]]Haltbarkeit, bedeutet das, dass wir nur 2 Gold bekommen\n[[YELLOW]]k\u00F6nnen (Spitzhacke=3 Goldbarren, also jeder 33,33%\n[[YELLOW]]Haltbarkeit) was 66% entspricht. Wenn dein\n[[YELLOW]]Ertragsprozentsatz unter 66% liegt wirst du keine 2 Barren\n[[YELLOW]]bekommen k\u00F6nnen. Wenn sie dar\u00FCber ist, kannst du den\n[[YELLOW]]"gesamten Betrag" bekommen, der aus 2 Eisenbarren besteht.
|
||||||
Guides.Salvage.Section.4=[[DARK_AQUA]]Wie funktioniert Arkanes Verwerten?\n[[YELLOW]]Diese F\u00E4higkeit erm\u00F6glicht es verzauberte B\u00FCcher beim\n[[YELLOW]]Verwerten von verzauberten Items zu bekommen.\n[[YELLOW]]Verzauberungen k\u00F6nnen vollkommen oder teilweise extrahiert\n[[YELLOW]]werden.\n[[YELLOW]]Bei einer teilweisen Extraktion wird das Verzauberungslevel\n[[YELLOW]]reduziert.
|
Guides.Salvage.Section.4=[[DARK_AQUA]]Wie funktioniert Arkanes Verwerten?\n[[YELLOW]]Diese F\u00E4higkeit erm\u00F6glicht es verzauberte B\u00FCcher beim\n[[YELLOW]]Verwerten von verzauberten Items zu bekommen.\n[[YELLOW]]Verzauberungen k\u00F6nnen vollkommen oder teilweise extrahiert\n[[YELLOW]]werden.\n[[YELLOW]]Bei einer teilweisen Extraktion wird das Verzauberungslevel\n[[YELLOW]]reduziert.
|
||||||
|
|
||||||
##Smelting
|
##Smelting
|
||||||
Guides.Smelting.Section.0=Kommt irgendwann mal...
|
Guides.Smelting.Section.0=Kommt irgendwann mal...
|
||||||
Guides.Smelting.Section.1=Immer noch hier?
|
Guides.Smelting.Section.1=Immer noch hier?
|
||||||
|
|
||||||
##Swords
|
##Swords
|
||||||
Guides.Swords.Section.0=[[DARK_AQUA]]\u00DCber Schwerter:\n[[YELLOW]]Diese F\u00E4higkeit gibt Kampfboni bei Benutzung\n[[YELLOW]]des Schwertes.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Verletze Monster und Spieler mit dem Schwert.
|
Guides.Swords.Section.0=[[DARK_AQUA]]\u00DCber Schwerter:\n[[YELLOW]]Diese F\u00E4higkeit gibt Kampfboni bei Benutzung\n[[YELLOW]]des Schwertes.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Verletze Monster und Spieler mit dem Schwert.
|
||||||
Guides.Swords.Section.1=[[DARK_AQUA]]Wie funktioniert der S\u00E4gezahnschlag??\n[[YELLOW]]S\u00E4gezahnschlag ist eine aktive F\u00E4higkeit die du mit Rechtsklick \n[[YELLOW]]aktivierst.\n[[YELLOW]]Mit dieser F\u00E4higkeit kannst du Fl\u00E4chenschaden verteilen. \n[[YELLOW]]Au\u00DFerdem blutet das Ziel f\u00FCr kurze Zeit.
|
Guides.Swords.Section.1=[[DARK_AQUA]]Wie funktioniert der S\u00E4gezahnschlag??\n[[YELLOW]]S\u00E4gezahnschlag ist eine aktive F\u00E4higkeit die du mit Rechtsklick \n[[YELLOW]]aktivierst.\n[[YELLOW]]Mit dieser F\u00E4higkeit kannst du Fl\u00E4chenschaden verteilen. \n[[YELLOW]]Au\u00DFerdem blutet das Ziel f\u00FCr kurze Zeit.
|
||||||
Guides.Swords.Section.2=[[DARK_AQUA]]Wie funktioniert der Gegenangriff?\n[[YELLOW]]Gegenangriff ist eine aktive F\u00E4higkeit,\n[[YELLOW]]bei der Angriffe von Monstern beim Blocken um bis zu 50%\n[[YELLOW]]des erhaltenen Schadens reflektiert werden k\u00F6nnen.
|
Guides.Swords.Section.2=[[DARK_AQUA]]Wie funktioniert der Gegenangriff?\n[[YELLOW]]Gegenangriff ist eine aktive F\u00E4higkeit,\n[[YELLOW]]bei der Angriffe von Monstern beim Blocken um bis zu 50%\n[[YELLOW]]des erhaltenen Schadens reflektiert werden k\u00F6nnen.
|
||||||
Guides.Swords.Section.3=[[DARK_AQUA]]Wie funktioniert Blutung?\n[[YELLOW]]Blutung f\u00FCgt den Gegnern alle 2 Sekunden Schaden zu. Das\n[[YELLOW]]Bluten geht solange bis die F\u00E4higkeit ausl\u00E4uft oder der\n[[YELLOW]]Gegner stirbt.\n[[YELLOW]]Die Dauer der Blutung erh\u00F6ht sich mit dem Schwert Skill.
|
Guides.Swords.Section.3=[[DARK_AQUA]]Wie funktioniert Blutung?\n[[YELLOW]]Blutung f\u00FCgt den Gegnern alle 2 Sekunden Schaden zu. Das\n[[YELLOW]]Bluten geht solange bis die F\u00E4higkeit ausl\u00E4uft oder der\n[[YELLOW]]Gegner stirbt.\n[[YELLOW]]Die Dauer der Blutung erh\u00F6ht sich mit dem Schwert Skill.
|
||||||
|
|
||||||
##Taming
|
##Taming
|
||||||
Guides.Taming.Section.0=[[DARK_AQUA]]\u00DCber Z\u00E4hmen:\n[[YELLOW]]Z\u00E4hmen gibt dem Spieler diverse Kampfboni beim Kampf mit\n[[YELLOW]]gez\u00E4hmten W\u00F6lfen.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Um XP zu bekommen musst du Tiere z\u00E4hmen oder mit\n[[YELLOW]]deinen W\u00F6lfen k\u00E4mpfen.
|
Guides.Taming.Section.0=[[DARK_AQUA]]\u00DCber Z\u00E4hmen:\n[[YELLOW]]Z\u00E4hmen gibt dem Spieler diverse Kampfboni beim Kampf mit\n[[YELLOW]]gez\u00E4hmten W\u00F6lfen.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Um XP zu bekommen musst du Tiere z\u00E4hmen oder mit\n[[YELLOW]]deinen W\u00F6lfen k\u00E4mpfen.
|
||||||
Guides.Taming.Section.1=[[DARK_AQUA]]Wie funktioniert Ruf der Wildnis?\n[[YELLOW]]Ruf der Wildnis ist eine aktive F\u00E4higkeit die dir erlaubt\n[[YELLOW]]einen Wolf, einen Ozelot oder ein Pferd an deine Seite zu\n[[YELLOW]]rufen. \n[[YELLOW]]Das tust du, indem du Linksklickst w\u00E4hrend du Knochen, Fisch\n[[YELLOW]]oder \u00C4pfel in der Hand h\u00E4ltst.
|
Guides.Taming.Section.1=[[DARK_AQUA]]Wie funktioniert Ruf der Wildnis?\n[[YELLOW]]Ruf der Wildnis ist eine aktive F\u00E4higkeit die dir erlaubt\n[[YELLOW]]einen Wolf, einen Ozelot oder ein Pferd an deine Seite zu\n[[YELLOW]]rufen. \n[[YELLOW]]Das tust du, indem du Linksklickst w\u00E4hrend du Knochen, Fisch\n[[YELLOW]]oder \u00C4pfel in der Hand h\u00E4ltst.
|
||||||
@ -826,7 +790,6 @@ Guides.Taming.Section.5=[[DARK_AQUA]]Wie funktioniert Umweltbewusst?\n[[YELLOW]]
|
|||||||
Guides.Taming.Section.6=[[DARK_AQUA]]Wie funktioniert Dicker Pelz?\n[[YELLOW]]Diese passive F\u00E4higkeit reduziert Schaden und \n[[YELLOW]]macht W\u00F6lfe feuerresistent.
|
Guides.Taming.Section.6=[[DARK_AQUA]]Wie funktioniert Dicker Pelz?\n[[YELLOW]]Diese passive F\u00E4higkeit reduziert Schaden und \n[[YELLOW]]macht W\u00F6lfe feuerresistent.
|
||||||
Guides.Taming.Section.7=[[DARK_AQUA]]Wie funktioniert Schocksicher?\n[[YELLOW]]Diese passive F\u00E4higkeit reduziert den Schaden\n[[YELLOW]]durch Explosionen.
|
Guides.Taming.Section.7=[[DARK_AQUA]]Wie funktioniert Schocksicher?\n[[YELLOW]]Diese passive F\u00E4higkeit reduziert den Schaden\n[[YELLOW]]durch Explosionen.
|
||||||
Guides.Taming.Section.8=[[DARK_AQUA]]Wie funktioniert Schnell-Imbiss?\n[[YELLOW]]Diese passive F\u00E4higkeit gibt dem Wolf eine Chance sich zu \n[[YELLOW]]erholen wann immer er einen Gegner verletzt.
|
Guides.Taming.Section.8=[[DARK_AQUA]]Wie funktioniert Schnell-Imbiss?\n[[YELLOW]]Diese passive F\u00E4higkeit gibt dem Wolf eine Chance sich zu \n[[YELLOW]]erholen wann immer er einen Gegner verletzt.
|
||||||
|
|
||||||
##Unarmed
|
##Unarmed
|
||||||
Guides.Unarmed.Section.0=[[DARK_AQUA]]\u00DCber Unbewaffnet:\n[[YELLOW]]Mit Unbewaffnet kann der echte Mann endlich mit seinen\n[[YELLOW]]F\u00E4usten angemessen zuschlagen. \n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]K\u00E4mpfe unbewaffnet gegen Monster und andere Spieler
|
Guides.Unarmed.Section.0=[[DARK_AQUA]]\u00DCber Unbewaffnet:\n[[YELLOW]]Mit Unbewaffnet kann der echte Mann endlich mit seinen\n[[YELLOW]]F\u00E4usten angemessen zuschlagen. \n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]K\u00E4mpfe unbewaffnet gegen Monster und andere Spieler
|
||||||
Guides.Unarmed.Section.1=[[DARK_AQUA]]Wie funktioniert Berserker?\n[[YELLOW]]Berserker ist eine aktive F\u00E4higkeit die mit Rechtsklick\n[[YELLOW]]aktiviert wird.\n[[YELLOW]]Im Berserker Modus f\u00FCgst du 50% mehr Schaden zu und\n[[YELLOW]]kannst weiche Materiale wie Gras und Erde sofort abbauen.
|
Guides.Unarmed.Section.1=[[DARK_AQUA]]Wie funktioniert Berserker?\n[[YELLOW]]Berserker ist eine aktive F\u00E4higkeit die mit Rechtsklick\n[[YELLOW]]aktiviert wird.\n[[YELLOW]]Im Berserker Modus f\u00FCgst du 50% mehr Schaden zu und\n[[YELLOW]]kannst weiche Materiale wie Gras und Erde sofort abbauen.
|
||||||
@ -834,19 +797,16 @@ Guides.Unarmed.Section.2=[[DARK_AQUA]]Wie funktioniert der Eiserne Arm?\n[[YELLO
|
|||||||
Guides.Unarmed.Section.3=[[DARK_AQUA]]Wie funktioniert Pfeilablenkung?\n[[YELLOW]]Pfeilablenkung ist eine passive F\u00E4higkeit die ab und zu\n[[YELLOW]]Pfeile von Skeletten und angreifenden Spielern ablenkt.\n[[YELLOW]]Diese Pfeile prallen einfach ab und fallen auf den Boden.
|
Guides.Unarmed.Section.3=[[DARK_AQUA]]Wie funktioniert Pfeilablenkung?\n[[YELLOW]]Pfeilablenkung ist eine passive F\u00E4higkeit die ab und zu\n[[YELLOW]]Pfeile von Skeletten und angreifenden Spielern ablenkt.\n[[YELLOW]]Diese Pfeile prallen einfach ab und fallen auf den Boden.
|
||||||
Guides.Unarmed.Section.4=[[DARK_AQUA]]Wie funktioniert der Eiserne Griff?\n[[YELLOW]]Eiserner Griff ist eine passive F\u00E4higkeit die Entwaffnung\n[[YELLOW]]verhindert. Mit h\u00F6herem Level ist es umso einfacher\n[[YELLOW]]Entwaffnung zu verhindern.
|
Guides.Unarmed.Section.4=[[DARK_AQUA]]Wie funktioniert der Eiserne Griff?\n[[YELLOW]]Eiserner Griff ist eine passive F\u00E4higkeit die Entwaffnung\n[[YELLOW]]verhindert. Mit h\u00F6herem Level ist es umso einfacher\n[[YELLOW]]Entwaffnung zu verhindern.
|
||||||
Guides.Unarmed.Section.5=[[DARK_AQUA]]Wie funktioniert Entwaffnen?\n[[YELLOW]]Diese passive F\u00E4higkeit erm\u00F6glich es den Gegner zu\n[[YELLOW]]entwaffnen, sodass seine Waffe auf den Boden f\u00E4llt.
|
Guides.Unarmed.Section.5=[[DARK_AQUA]]Wie funktioniert Entwaffnen?\n[[YELLOW]]Diese passive F\u00E4higkeit erm\u00F6glich es den Gegner zu\n[[YELLOW]]entwaffnen, sodass seine Waffe auf den Boden f\u00E4llt.
|
||||||
|
|
||||||
##Woodcutting
|
##Woodcutting
|
||||||
Guides.Woodcutting.Section.0=[[DARK_AQUA]]\u00DCber Holzf\u00E4ller:\n[[YELLOW]]Im Holzf\u00E4llen geht es um das F\u00E4llen von B\u00E4umen.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Du kriegst XP f\u00FCr das abholzen von Baumst\u00E4mmen.
|
Guides.Woodcutting.Section.0=[[DARK_AQUA]]\u00DCber Holzf\u00E4ller:\n[[YELLOW]]Im Holzf\u00E4llen geht es um das F\u00E4llen von B\u00E4umen.\n\n[[DARK_AQUA]]XP ZUWACHS:\n[[YELLOW]]Du kriegst XP f\u00FCr das abholzen von Baumst\u00E4mmen.
|
||||||
Guides.Woodcutting.Section.1=[[DARK_AQUA]]Wie funktioniert der Baumf\u00E4ller?\n[[YELLOW]]Baumf\u00E4ller ist eine aktive F\u00E4higkeit. Mache mit der Axt in der\n[[YELLOW]]Hand einen Rechtsklick um sie zu aktivieren. Der Baum\n[[YELLOW]]wird sofortig gef\u00E4llt und alle St\u00E4mme abgebaut.
|
Guides.Woodcutting.Section.1=[[DARK_AQUA]]Wie funktioniert der Baumf\u00E4ller?\n[[YELLOW]]Baumf\u00E4ller ist eine aktive F\u00E4higkeit. Mache mit der Axt in der\n[[YELLOW]]Hand einen Rechtsklick um sie zu aktivieren. Der Baum\n[[YELLOW]]wird sofortig gef\u00E4llt und alle St\u00E4mme abgebaut.
|
||||||
Guides.Woodcutting.Section.2=[[DARK_AQUA]]Wie funktioniert Bl\u00E4ttersturm?\n[[YELLOW]]Bl\u00E4ttersturm ist eine passive F\u00E4higkeit die Bl\u00E4tter\n[[YELLOW]]bei Ber\u00FChrung mit der Axt sofortig bricht. Standardm\u00E4\u00DFig\n[[YELLOW]]wird diese F\u00E4higkeit bei Level 100 freigeschaltet.
|
Guides.Woodcutting.Section.2=[[DARK_AQUA]]Wie funktioniert Bl\u00E4ttersturm?\n[[YELLOW]]Bl\u00E4ttersturm ist eine passive F\u00E4higkeit die Bl\u00E4tter\n[[YELLOW]]bei Ber\u00FChrung mit der Axt sofortig bricht. Standardm\u00E4\u00DFig\n[[YELLOW]]wird diese F\u00E4higkeit bei Level 100 freigeschaltet.
|
||||||
Guides.Woodcutting.Section.3=[[DARK_AQUA]]Wie funktionieren Doppel-Drops?\n[[YELLOW]]Diese passive F\u00E4higkeit gibt dir ab und zu doppelten\n[[YELLOW]]Ertrag f\u00FCr jeden Stamm den du f\u00E4llst.
|
Guides.Woodcutting.Section.3=[[DARK_AQUA]]Wie funktionieren Doppel-Drops?\n[[YELLOW]]Diese passive F\u00E4higkeit gibt dir ab und zu doppelten\n[[YELLOW]]Ertrag f\u00FCr jeden Stamm den du f\u00E4llst.
|
||||||
|
|
||||||
#INSPECT
|
#INSPECT
|
||||||
Inspect.Offline=[[RED]]Du hast nicht die Rechte um offline Spieler zu inspizieren!
|
Inspect.Offline=[[RED]]Du hast nicht die Rechte um offline Spieler zu inspizieren!
|
||||||
Inspect.OfflineStats=mcMMO Stats f\u00FCr Offline Spieler [[YELLOW]]{0}
|
Inspect.OfflineStats=mcMMO Stats f\u00FCr Offline Spieler [[YELLOW]]{0}
|
||||||
Inspect.Stats=[[GREEN]]mcMMO Stats f\u00FCr [[YELLOW]]{0}
|
Inspect.Stats=[[GREEN]]mcMMO Stats f\u00FCr [[YELLOW]]{0}
|
||||||
Inspect.TooFar=Du bist zu weit entfernt um den Spieler zu inspizieren!
|
Inspect.TooFar=Du bist zu weit entfernt um den Spieler zu inspizieren!
|
||||||
|
|
||||||
#ITEMS
|
#ITEMS
|
||||||
Item.ChimaeraWing.Fail=**CHIMAERA FL\u00DCGEL GESCHEITERT!**
|
Item.ChimaeraWing.Fail=**CHIMAERA FL\u00DCGEL GESCHEITERT!**
|
||||||
Item.ChimaeraWing.Pass=**CHIMAERA FL\u00DCGEL*
|
Item.ChimaeraWing.Pass=**CHIMAERA FL\u00DCGEL*
|
||||||
@ -857,11 +817,9 @@ Item.Injured.Wait=Du wurdest vor kurzem verletzt und musst warten bis du das ver
|
|||||||
Item.FluxPickaxe.Name=Flux Spitzhacke
|
Item.FluxPickaxe.Name=Flux Spitzhacke
|
||||||
Item.FluxPickaxe.Lore.1=[[GRAY]]Hat eine Wahrscheinlichkeit Erze sofort zu schmelzen.
|
Item.FluxPickaxe.Lore.1=[[GRAY]]Hat eine Wahrscheinlichkeit Erze sofort zu schmelzen.
|
||||||
Item.FluxPickaxe.Lore.2=[[GRAY]]Ben\u00F6tigt Schmelzen Level {0}+
|
Item.FluxPickaxe.Lore.2=[[GRAY]]Ben\u00F6tigt Schmelzen Level {0}+
|
||||||
|
|
||||||
#TELEPORTATION
|
#TELEPORTATION
|
||||||
Teleport.Commencing=[[GRAY]]Beginne Teleport in [[GOLD]]({0}) [[GRAY]]Sekunden, bitte stillhalten...
|
Teleport.Commencing=[[GRAY]]Beginne Teleport in [[GOLD]]({0}) [[GRAY]]Sekunden, bitte stillhalten...
|
||||||
Teleport.Cancelled=[[DARK_RED]]Teleport abgebrochen!
|
Teleport.Cancelled=[[DARK_RED]]Teleport abgebrochen!
|
||||||
|
|
||||||
#SKILLS
|
#SKILLS
|
||||||
Skills.Child=[[GOLD]](VERWANDTER SKILL)
|
Skills.Child=[[GOLD]](VERWANDTER SKILL)
|
||||||
Skills.Disarmed=[[DARK_RED]]Du wurdest entwaffnet!
|
Skills.Disarmed=[[DARK_RED]]Du wurdest entwaffnet!
|
||||||
@ -873,13 +831,11 @@ Skills.ChildStats={0}[[GREEN]]{1}
|
|||||||
Skills.TooTired=Du bist zu m\u00FCde um diese F\u00E4higkeit zu verwenden. [[YELLOW]]({0}s)
|
Skills.TooTired=Du bist zu m\u00FCde um diese F\u00E4higkeit zu verwenden. [[YELLOW]]({0}s)
|
||||||
Skills.Cancelled={0} abgebrochen!
|
Skills.Cancelled={0} abgebrochen!
|
||||||
Skills.ConfirmOrCancel=[[GREEN]]Erneuter Rechtsklick zur Best\u00E4tigung [[GOLD]]{0}[[GREEN]]. Linksklick zum abbrechen.
|
Skills.ConfirmOrCancel=[[GREEN]]Erneuter Rechtsklick zur Best\u00E4tigung [[GOLD]]{0}[[GREEN]]. Linksklick zum abbrechen.
|
||||||
|
|
||||||
#STATISTICS
|
#STATISTICS
|
||||||
Stats.Header.Combat=[[GOLD]]-=KAMPFSKILLS=-
|
Stats.Header.Combat=[[GOLD]]-=KAMPFSKILLS=-
|
||||||
Stats.Header.Gathering=[[GOLD]]-=SAMMELSKILLS=-
|
Stats.Header.Gathering=[[GOLD]]-=SAMMELSKILLS=-
|
||||||
Stats.Header.Misc=[[GOLD]]-=DIV.SKILLS=-
|
Stats.Header.Misc=[[GOLD]]-=DIV.SKILLS=-
|
||||||
Stats.Own.Stats=[[GREEN]][mcMMO] Stats
|
Stats.Own.Stats=[[GREEN]][mcMMO] Stats
|
||||||
|
|
||||||
#PERKS
|
#PERKS
|
||||||
Perks.XP.Name=Erfahrung
|
Perks.XP.Name=Erfahrung
|
||||||
Perks.XP.Desc=Erhalte mehr Erfahrung in bestimmen Skills.
|
Perks.XP.Desc=Erhalte mehr Erfahrung in bestimmen Skills.
|
||||||
@ -892,7 +848,6 @@ Perks.Cooldowns.Desc=Verk\u00FCrzt die Abklingzeit um {0}.
|
|||||||
Perks.ActivationTime.Name=Ausdauer
|
Perks.ActivationTime.Name=Ausdauer
|
||||||
Perks.ActivationTime.Desc=Erh\u00F6ht die F\u00E4higkeitszeit um {0} Sekunden.
|
Perks.ActivationTime.Desc=Erh\u00F6ht die F\u00E4higkeitszeit um {0} Sekunden.
|
||||||
Perks.ActivationTime.Bonus=[[GOLD]] ({0}s mit Ausdauer Bonus)
|
Perks.ActivationTime.Bonus=[[GOLD]] ({0}s mit Ausdauer Bonus)
|
||||||
|
|
||||||
#HARDCORE
|
#HARDCORE
|
||||||
Hardcore.Mode.Disabled=[[GOLD]][mcMMO] Hardcore Modus {0} deaktiviert f\u00FCr {1}.
|
Hardcore.Mode.Disabled=[[GOLD]][mcMMO] Hardcore Modus {0} deaktiviert f\u00FCr {1}.
|
||||||
Hardcore.Mode.Enabled=[[GOLD]][mcMMO] Hardcore Modus {0} aktiviert f\u00FCr {1}.
|
Hardcore.Mode.Enabled=[[GOLD]][mcMMO] Hardcore Modus {0} aktiviert f\u00FCr {1}.
|
||||||
@ -905,7 +860,6 @@ Hardcore.Vampirism.Killer.Success=[[GOLD]][mcMMO] [[DARK_AQUA]]Du hast [[BLUE]]{
|
|||||||
Hardcore.Vampirism.Victim.Failure=[[GOLD]][mcMMO] [[YELLOW]]{0}[[GRAY]] hat es nicht geschafft Wissen von dir zu stehlen!
|
Hardcore.Vampirism.Victim.Failure=[[GOLD]][mcMMO] [[YELLOW]]{0}[[GRAY]] hat es nicht geschafft Wissen von dir zu stehlen!
|
||||||
Hardcore.Vampirism.Victim.Success=[[GOLD]][mcMMO] [[YELLOW]]{0}[[DARK_RED]] hat[[BLUE]]{1}[[DARK_RED]] Level von dir gestohlen!
|
Hardcore.Vampirism.Victim.Success=[[GOLD]][mcMMO] [[YELLOW]]{0}[[DARK_RED]] hat[[BLUE]]{1}[[DARK_RED]] Level von dir gestohlen!
|
||||||
Hardcore.Vampirism.PercentageChanged=[[GOLD]][mcMMO] Der Vampirismus Prozentsatz wurde auf {0} ge\u00E4ndert.
|
Hardcore.Vampirism.PercentageChanged=[[GOLD]][mcMMO] Der Vampirismus Prozentsatz wurde auf {0} ge\u00E4ndert.
|
||||||
|
|
||||||
#MOTD
|
#MOTD
|
||||||
MOTD.Donate=[[DARK_AQUA]]Spenden Info:
|
MOTD.Donate=[[DARK_AQUA]]Spenden Info:
|
||||||
MOTD.Hardcore.Enabled=[[GOLD]][mcMMO] [[DARK_AQUA]]Hardcore Modus aktiviert: [[DARK_RED]]{0}
|
MOTD.Hardcore.Enabled=[[GOLD]][mcMMO] [[DARK_AQUA]]Hardcore Modus aktiviert: [[DARK_RED]]{0}
|
||||||
@ -914,7 +868,6 @@ MOTD.Hardcore.Vampirism.Stats=[[GOLD]][mcMMO] [[DARK_AQUA]]Vampirismus Prozentsa
|
|||||||
MOTD.PerksPrefix=[mcMMO Boni]
|
MOTD.PerksPrefix=[mcMMO Boni]
|
||||||
MOTD.Version=[[GOLD]][mcMMO] Verwende Version[[DARK_AQUA]]{0}
|
MOTD.Version=[[GOLD]][mcMMO] Verwende Version[[DARK_AQUA]]{0}
|
||||||
MOTD.Website=[[GOLD]][mcMMO] [[GREEN]]{0}[[YELLOW]] - mcMMO Webseite
|
MOTD.Website=[[GOLD]][mcMMO] [[GREEN]]{0}[[YELLOW]] - mcMMO Webseite
|
||||||
|
|
||||||
#SMELTING
|
#SMELTING
|
||||||
Smelting.Ability.FluxMining=Schmelztiegel: [[YELLOW]]{0}
|
Smelting.Ability.FluxMining=Schmelztiegel: [[YELLOW]]{0}
|
||||||
Smelting.Ability.FuelEfficiency=Brennstoff Effizienz Multiplikator: [[YELLOW]]{0}x
|
Smelting.Ability.FuelEfficiency=Brennstoff Effizienz Multiplikator: [[YELLOW]]{0}x
|
||||||
@ -932,7 +885,6 @@ Smelting.SubSkill.FluxMining.Name=Schmelztiegel
|
|||||||
Smelting.SubSkill.FluxMining.Description=M\u00F6glichkeit, Erze direkt beim Abbauen zu Schmelzen
|
Smelting.SubSkill.FluxMining.Description=M\u00F6glichkeit, Erze direkt beim Abbauen zu Schmelzen
|
||||||
Smelting.Listener=Schmelzen:
|
Smelting.Listener=Schmelzen:
|
||||||
Smelting.SkillName=SCHMELZEN
|
Smelting.SkillName=SCHMELZEN
|
||||||
|
|
||||||
#COMMAND DESCRIPTIONS
|
#COMMAND DESCRIPTIONS
|
||||||
Commands.Description.addlevels=Gib einem Spieler mcMMO Level
|
Commands.Description.addlevels=Gib einem Spieler mcMMO Level
|
||||||
Commands.Description.adminchat=Schalte den mcMMO Adminchat an/aus oder sende Adminchat Nachrichten
|
Commands.Description.adminchat=Schalte den mcMMO Adminchat an/aus oder sende Adminchat Nachrichten
|
||||||
@ -964,11 +916,9 @@ Commands.Description.skillreset=Setze die mcMMO Level f\u00FCr einen Spieler zur
|
|||||||
Commands.Description.vampirism=Schalte Vampirismus an/aus / \u00E4ndere den Vampirismus Prozentsatz
|
Commands.Description.vampirism=Schalte Vampirismus an/aus / \u00E4ndere den Vampirismus Prozentsatz
|
||||||
Commands.Description.xplock=Setze deine mcMMO XP-Leiste auf einen bestimmten Skill fest
|
Commands.Description.xplock=Setze deine mcMMO XP-Leiste auf einen bestimmten Skill fest
|
||||||
Commands.Description.xprate=\u00C4ndere die mcMMO XP Rate oder starte ein XP Event
|
Commands.Description.xprate=\u00C4ndere die mcMMO XP Rate oder starte ein XP Event
|
||||||
|
|
||||||
#UPDATE CHECKER
|
#UPDATE CHECKER
|
||||||
UpdateChecker.Outdated=Du verwendest eine veraltete mcMMO Version!
|
UpdateChecker.Outdated=Du verwendest eine veraltete mcMMO Version!
|
||||||
UpdateChecker.NewAvailable=Eine neue Version ist auf BukkitDev erh\u00E4ltlich.
|
UpdateChecker.NewAvailable=Eine neue Version ist auf BukkitDev erh\u00E4ltlich.
|
||||||
|
|
||||||
#SCOREBOARD HEADERS
|
#SCOREBOARD HEADERS
|
||||||
Scoreboard.Header.PlayerStats=mcMMO Stats
|
Scoreboard.Header.PlayerStats=mcMMO Stats
|
||||||
Scoreboard.Header.PlayerCooldowns=mcMMO Abklingzeiten
|
Scoreboard.Header.PlayerCooldowns=mcMMO Abklingzeiten
|
||||||
@ -982,7 +932,6 @@ Scoreboard.Misc.RemainingXP=Verbliebene XP
|
|||||||
Scoreboard.Misc.Cooldown=[[LIGHT_PURPLE]]Abklingzeit
|
Scoreboard.Misc.Cooldown=[[LIGHT_PURPLE]]Abklingzeit
|
||||||
Scoreboard.Misc.Overall=[[GOLD]]Insgesamt
|
Scoreboard.Misc.Overall=[[GOLD]]Insgesamt
|
||||||
Scoreboard.Misc.Ability=F\u00E4higkeit
|
Scoreboard.Misc.Ability=F\u00E4higkeit
|
||||||
|
|
||||||
#DATABASE RECOVERY
|
#DATABASE RECOVERY
|
||||||
Profile.Loading.Success=[[GREEN]]Your mcMMO profile has been loaded.
|
Profile.Loading.Success=[[GREEN]]Your mcMMO profile has been loaded.
|
||||||
Profile.Loading.Failure=mcMMO still cannot load your data. You may want to [[AQUA]]contact the server owner.\n[[YELLOW]]You can still play on the server, but you will have [[BOLD]]no mcMMO levels[[YELLOW]] and any XP you get [[BOLD]]will not be saved[[YELLOW]].
|
Profile.Loading.Failure=mcMMO still cannot load your data. You may want to [[AQUA]]contact the server owner.\n[[YELLOW]]You can still play on the server, but you will have [[BOLD]]no mcMMO levels[[YELLOW]] and any XP you get [[BOLD]]will not be saved[[YELLOW]].
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user