mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-02-18 17:53:00 +01:00
Compare commits
48 Commits
dev-serial
...
1.5.00
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb359c5595 | ||
|
|
e1b8088c17 | ||
|
|
70a1eea231 | ||
|
|
c744974192 | ||
|
|
faa11a87a9 | ||
|
|
91da5c4ab1 | ||
|
|
da5e770e06 | ||
|
|
09557e378b | ||
|
|
72d26fed0f | ||
|
|
225de799e8 | ||
|
|
334c44760f | ||
|
|
ac7fc1020d | ||
|
|
461871327b | ||
|
|
60ddd799de | ||
|
|
80571fbe8f | ||
|
|
d407f85704 | ||
|
|
458dc7db42 | ||
|
|
beab794c0e | ||
|
|
8256f5461c | ||
|
|
0fe3ad7432 | ||
|
|
04e5dda127 | ||
|
|
f65adea2f9 | ||
|
|
cdfb0da5c9 | ||
|
|
cfa3d34dff | ||
|
|
01b7d4f742 | ||
|
|
9a359bf42c | ||
|
|
ebdf11300b | ||
|
|
e1a8f02bce | ||
|
|
862d38b587 | ||
|
|
2415767c06 | ||
|
|
aa59348a94 | ||
|
|
9c925d3327 | ||
|
|
30f7521a3a | ||
|
|
7b3869e385 | ||
|
|
0e641f7c5b | ||
|
|
733d16cf35 | ||
|
|
833bc1b251 | ||
|
|
840f3d9382 | ||
|
|
34d6d867f2 | ||
|
|
e56d5a0454 | ||
|
|
53fdf750f4 | ||
|
|
f096e915cf | ||
|
|
ce59488e8e | ||
|
|
47db522cc1 | ||
|
|
a2cac82cba | ||
|
|
2e74333eb7 | ||
|
|
0056be2d5f | ||
|
|
1d7e034d5e |
@@ -7,7 +7,21 @@ Key:
|
|||||||
! Change
|
! Change
|
||||||
- Removal
|
- Removal
|
||||||
|
|
||||||
Version 1.4.08-dev
|
Version 1.5.00
|
||||||
|
+ Added Podzol & Red Sand to Excavation
|
||||||
|
+ Added Hardened Clay, Stained Clay, and Packed Ice to Mining blocks
|
||||||
|
+ Added Acacia and Dark Oak to Woodcutting blocks
|
||||||
|
+ Added Salmon, Clownfish, and Pufferfish to Fishing XP
|
||||||
|
+ Added new flowers and grasses to Herbalism XP
|
||||||
|
+ Added option to config.yml which allows players to always catch fish, even when a treasure is found
|
||||||
|
+ Added option to config.yml to override vanilla Minecraft treasures
|
||||||
|
! Fishing XP now depends on the type of fish.
|
||||||
|
! Woodcutting XP in experience.yml and Woodcutting double drops in config.yml now use the tree species names. Oak is now Generic, and Spruce is now Redwood.
|
||||||
|
! Red_Rose was replaced by Poppy, and so the key in experience.yml has been updated accordingly.
|
||||||
|
- Removed deprecated permission nodes
|
||||||
|
- Removed "Treasure found!" message
|
||||||
|
|
||||||
|
Version 1.4.08
|
||||||
+ Added a new skill; Alchemy. Special thanks to EasyMFnE for creating this!
|
+ Added a new skill; Alchemy. Special thanks to EasyMFnE for creating this!
|
||||||
+ Added SecondaryAbilityType enum, and new SecondaryAbilityWeightedActivationCheckEvent, fired when a secondary ability checkes its activation chances
|
+ Added SecondaryAbilityType enum, and new SecondaryAbilityWeightedActivationCheckEvent, fired when a secondary ability checkes its activation chances
|
||||||
+ Added the possibility to gain experience when using Fishing "Shake"
|
+ Added the possibility to gain experience when using Fishing "Shake"
|
||||||
@@ -21,6 +35,10 @@ Version 1.4.08-dev
|
|||||||
+ Added new experience bonus perk 'mcmmo.perks.xp.customboost.<skillname>' multiplies incoming XP by the boost amount defined in the experience config
|
+ Added new experience bonus perk 'mcmmo.perks.xp.customboost.<skillname>' multiplies incoming XP by the boost amount defined in the experience config
|
||||||
+ Added Ender Dragon, Wither, and Witch to combat experience multipliers - they do not give XP by default
|
+ Added Ender Dragon, Wither, and Witch to combat experience multipliers - they do not give XP by default
|
||||||
+ Added support for multiple mod config files, naming can be done as either armor.<modname>.yml or <modname>.armor.yml
|
+ Added support for multiple mod config files, naming can be done as either armor.<modname>.yml or <modname>.armor.yml
|
||||||
|
+ Added config options to configure the items used in "Call of the Wild"
|
||||||
|
+ Added config option to configure the database command cooldown
|
||||||
|
= Fixed bug where healthbars wouldn't display if skills were disabled
|
||||||
|
= Fixed bug with "Call of the Wild" entities despawning
|
||||||
= Fixed bug with updating (very) old user data.
|
= Fixed bug with updating (very) old user data.
|
||||||
= Fixed bug with checking maximum durability of mod items.
|
= Fixed bug with checking maximum durability of mod items.
|
||||||
= Fixed exploit involving Call of The Wild.
|
= Fixed exploit involving Call of The Wild.
|
||||||
@@ -37,9 +55,12 @@ Version 1.4.08-dev
|
|||||||
= Fixed bug where party chat broke if the display name contained special characters
|
= Fixed bug where party chat broke if the display name contained special characters
|
||||||
= Fixed bug where `/addlevels all` and `/skillreset all` didn't work
|
= Fixed bug where `/addlevels all` and `/skillreset all` didn't work
|
||||||
= Fixed bug which made it possible to gain XP by taming the same horse multiple times, if a player "untamed" that horse
|
= Fixed bug which made it possible to gain XP by taming the same horse multiple times, if a player "untamed" that horse
|
||||||
|
= Fixed bug where some horses summoned with "Call of the Wild" were unable to jump
|
||||||
= Fixed bug where the /ptp request expiration time was checked wrongly - preventing players from using the command
|
= Fixed bug where the /ptp request expiration time was checked wrongly - preventing players from using the command
|
||||||
= Fixed bug where Hylian Luck was broken
|
= Fixed bug where Hylian Luck was broken
|
||||||
= Fixed bug where Snow would never drop treasures
|
= Fixed bug where Snow would never drop treasures
|
||||||
|
= Fixed issues with commands giving away vanished players.
|
||||||
|
= Fixed bug where the Repair lucky perk would increase the Arcane Forging downgrade chance, instead of decreasing it
|
||||||
! Changed party system. Parties now have XP and Levels. Party features such as party teleport and party chat have to be unlocked before they can be used by the party members
|
! Changed party system. Parties now have XP and Levels. Party features such as party teleport and party chat have to be unlocked before they can be used by the party members
|
||||||
! Changed appearance of party member list. Gold = party leader, White = online, Gray = offline, Italic = not nearby
|
! Changed appearance of party member list. Gold = party leader, White = online, Gray = offline, Italic = not nearby
|
||||||
! Updated localization files
|
! Updated localization files
|
||||||
@@ -49,6 +70,8 @@ Version 1.4.08-dev
|
|||||||
! Changed /ptp config setting, Commands.ptp.Confirm_Required is now Commands.ptp.Accept.Required
|
! Changed /ptp config setting, Commands.ptp.Confirm_Required is now Commands.ptp.Accept.Required
|
||||||
! Changed config validation for UnlockLevels, they can now also be 0
|
! Changed config validation for UnlockLevels, they can now also be 0
|
||||||
! Changed config validation for Rank_Levels, successive Ranks can now be less than or equal to each other
|
! Changed config validation for Rank_Levels, successive Ranks can now be less than or equal to each other
|
||||||
|
! Changed default amount of XP gained from mining Quartz Ore. From 250 to 100 XP.
|
||||||
|
! Changed Acrobatics config setting, Skills.Acrobatics.Prevent_XP_After_Teleport is now Skills.Acrobatics.XP_After_Teleport_Cooldown
|
||||||
- Removed /stats alias for /mcstats
|
- Removed /stats alias for /mcstats
|
||||||
|
|
||||||
Version 1.4.07
|
Version 1.4.07
|
||||||
|
|||||||
4
pom.xml
4
pom.xml
@@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||||
<artifactId>mcMMO</artifactId>
|
<artifactId>mcMMO</artifactId>
|
||||||
<version>1.4.08-SNAPSHOT</version>
|
<version>1.5.00</version>
|
||||||
<name>mcMMO</name>
|
<name>mcMMO</name>
|
||||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||||
<issueManagement>
|
<issueManagement>
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>1.6.4-R2.0</version>
|
<version>LATEST</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|||||||
@@ -43,9 +43,7 @@ public final class ExperienceAPI {
|
|||||||
public static boolean isNonChildSkill(String skillType) {
|
public static boolean isNonChildSkill(String skillType) {
|
||||||
SkillType skill = SkillType.getSkill(skillType);
|
SkillType skill = SkillType.getSkill(skillType);
|
||||||
|
|
||||||
if (skill == null) return false;
|
return skill != null && !skill.isChildSkill();
|
||||||
|
|
||||||
return !skill.isChildSkill();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@@ -58,7 +57,7 @@ public class KrakenCommand implements TabExecutor {
|
|||||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
Set<String> playerNames = UserManager.getPlayerNames();
|
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
default:
|
default:
|
||||||
return ImmutableList.of();
|
return ImmutableList.of();
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@@ -62,7 +61,7 @@ public abstract class ToggleCommand implements TabExecutor {
|
|||||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
Set<String> playerNames = UserManager.getPlayerNames();
|
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
default:
|
default:
|
||||||
return ImmutableList.of();
|
return ImmutableList.of();
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import org.bukkit.command.TabExecutor;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.StringUtil;
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
|
||||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.chat.ChatManager;
|
import com.gmail.nossr50.chat.ChatManager;
|
||||||
import com.gmail.nossr50.chat.ChatManagerFactory;
|
import com.gmail.nossr50.chat.ChatManagerFactory;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
||||||
|
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.database;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@@ -23,7 +22,7 @@ public class McremoveCommand implements TabExecutor {
|
|||||||
case 1:
|
case 1:
|
||||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
|
|
||||||
if (UserManager.getPlayer(playerName, true) == null && CommandUtils.unloadedProfile(sender, mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false))) {
|
if (UserManager.getOfflinePlayer(playerName) == null && CommandUtils.unloadedProfile(sender, mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +44,7 @@ public class McremoveCommand implements TabExecutor {
|
|||||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
Set<String> playerNames = UserManager.getPlayerNames();
|
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
default:
|
default:
|
||||||
return ImmutableList.of();
|
return ImmutableList.of();
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.experience;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@@ -68,7 +67,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
int value = Integer.parseInt(args[2]);
|
int value = Integer.parseInt(args[2]);
|
||||||
|
|
||||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||||
|
|
||||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||||
if (mcMMOPlayer == null) {
|
if (mcMMOPlayer == null) {
|
||||||
@@ -96,7 +95,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
Set<String> playerNames = UserManager.getPlayerNames();
|
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
case 2:
|
case 2:
|
||||||
return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
|
return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.experience;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@@ -66,7 +65,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||||
|
|
||||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||||
if (mcMMOPlayer == null) {
|
if (mcMMOPlayer == null) {
|
||||||
@@ -94,7 +93,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
Set<String> playerNames = UserManager.getPlayerNames();
|
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
case 2:
|
case 2:
|
||||||
return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
|
return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
@@ -13,6 +16,7 @@ import com.gmail.nossr50.mcMMO;
|
|||||||
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.datatypes.party.Party;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
@@ -175,7 +179,7 @@ public class PartyCommand implements TabExecutor {
|
|||||||
case INVITE:
|
case INVITE:
|
||||||
case KICK:
|
case KICK:
|
||||||
case OWNER:
|
case OWNER:
|
||||||
Set<String> playerNames = UserManager.getPlayerNames();
|
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||||
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
case XPSHARE:
|
case XPSHARE:
|
||||||
return StringUtil.copyPartialMatches(args[1], XPSHARE_COMPLETIONS, new ArrayList<String>(XPSHARE_COMPLETIONS.size()));
|
return StringUtil.copyPartialMatches(args[1], XPSHARE_COMPLETIONS, new ArrayList<String>(XPSHARE_COMPLETIONS.size()));
|
||||||
@@ -190,7 +194,10 @@ public class PartyCommand implements TabExecutor {
|
|||||||
List<String> matches = StringUtil.copyPartialMatches(args[1], PtpCommand.TELEPORT_SUBCOMMANDS, new ArrayList<String>(PtpCommand.TELEPORT_SUBCOMMANDS.size()));
|
List<String> matches = StringUtil.copyPartialMatches(args[1], PtpCommand.TELEPORT_SUBCOMMANDS, new ArrayList<String>(PtpCommand.TELEPORT_SUBCOMMANDS.size()));
|
||||||
|
|
||||||
if (matches.size() == 0) {
|
if (matches.size() == 0) {
|
||||||
playerNames = UserManager.getPlayerNames();
|
Player player = (Player) sender;
|
||||||
|
Party party = UserManager.getPlayer(player).getParty();
|
||||||
|
|
||||||
|
playerNames = party.getOnlinePlayerNames(player);
|
||||||
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class PartyInviteCommand implements CommandExecutor {
|
|||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 2:
|
case 2:
|
||||||
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName, true);
|
McMMOPlayer mcMMOTarget = UserManager.getOfflinePlayer(targetName);
|
||||||
|
|
||||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.gmail.nossr50.datatypes.party.Party;
|
|||||||
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.party.PartyManager;
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
public class PartyKickCommand implements CommandExecutor {
|
public class PartyKickCommand implements CommandExecutor {
|
||||||
@@ -19,13 +20,15 @@ public class PartyKickCommand implements CommandExecutor {
|
|||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 2:
|
case 2:
|
||||||
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||||
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(args[1]);
|
String targetName = CommandUtils.getMatchedPlayerName(args[1]);
|
||||||
|
|
||||||
if (!playerParty.getMembers().contains(target.getName())) {
|
if (!playerParty.getMembers().contains(targetName)) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", target.getName()));
|
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(targetName);
|
||||||
|
|
||||||
if (target.isOnline()) {
|
if (target.isOnline()) {
|
||||||
Player onlineTarget = target.getPlayer();
|
Player onlineTarget = target.getPlayer();
|
||||||
String partyName = playerParty.getName();
|
String partyName = playerParty.getName();
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.party.alliance;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@@ -111,7 +110,7 @@ public class PartyAllianceCommand implements TabExecutor {
|
|||||||
List<String> matches = StringUtil.copyPartialMatches(args[0], ALLIANCE_SUBCOMMANDS, new ArrayList<String>(ALLIANCE_SUBCOMMANDS.size()));
|
List<String> matches = StringUtil.copyPartialMatches(args[0], ALLIANCE_SUBCOMMANDS, new ArrayList<String>(ALLIANCE_SUBCOMMANDS.size()));
|
||||||
|
|
||||||
if (matches.size() == 0) {
|
if (matches.size() == 0) {
|
||||||
Set<String> playerNames = UserManager.getPlayerNames();
|
List<String> playerNames = CommandUtils.getOnlinePlayerNames(commandSender);
|
||||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class PartyAllianceInviteCommand implements CommandExecutor {
|
|||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 3:
|
case 3:
|
||||||
String targetName = CommandUtils.getMatchedPlayerName(args[2]);
|
String targetName = CommandUtils.getMatchedPlayerName(args[2]);
|
||||||
McMMOPlayer mcMMOTarget = UserManager.getPlayer(targetName, true);
|
McMMOPlayer mcMMOTarget = UserManager.getOfflinePlayer(targetName);
|
||||||
|
|
||||||
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.party.teleport;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
@@ -11,10 +10,10 @@ import org.bukkit.command.TabExecutor;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.StringUtil;
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.party.Party;
|
|
||||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||||
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@@ -109,7 +108,10 @@ public class PtpCommand implements TabExecutor {
|
|||||||
List<String> matches = StringUtil.copyPartialMatches(args[0], TELEPORT_SUBCOMMANDS, new ArrayList<String>(TELEPORT_SUBCOMMANDS.size()));
|
List<String> matches = StringUtil.copyPartialMatches(args[0], TELEPORT_SUBCOMMANDS, new ArrayList<String>(TELEPORT_SUBCOMMANDS.size()));
|
||||||
|
|
||||||
if (matches.size() == 0) {
|
if (matches.size() == 0) {
|
||||||
Set<String> playerNames = UserManager.getPlayerNames();
|
Player player = (Player) sender;
|
||||||
|
Party party = UserManager.getPlayer(player).getParty();
|
||||||
|
|
||||||
|
List<String> playerNames = party.getOnlinePlayerNames(player);
|
||||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.player;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@@ -29,7 +28,7 @@ public class InspectCommand implements TabExecutor {
|
|||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||||
|
|
||||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||||
if (mcMMOPlayer == null) {
|
if (mcMMOPlayer == null) {
|
||||||
@@ -104,7 +103,7 @@ public class InspectCommand implements TabExecutor {
|
|||||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
Set<String> playerNames = UserManager.getPlayerNames();
|
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
default:
|
default:
|
||||||
return ImmutableList.of();
|
return ImmutableList.of();
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.player;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@@ -15,7 +14,6 @@ import com.gmail.nossr50.config.Config;
|
|||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.runnables.commands.McrankCommandAsyncTask;
|
import com.gmail.nossr50.runnables.commands.McrankCommandAsyncTask;
|
||||||
import com.gmail.nossr50.util.Misc;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
@@ -47,7 +45,7 @@ public class McrankCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
String playerName = CommandUtils.getMatchedPlayerName(args[0]);
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||||
|
|
||||||
if (mcMMOPlayer != null) {
|
if (mcMMOPlayer != null) {
|
||||||
Player player = mcMMOPlayer.getPlayer();
|
Player player = mcMMOPlayer.getPlayer();
|
||||||
@@ -73,7 +71,7 @@ public class McrankCommand implements TabExecutor {
|
|||||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
Set<String> playerNames = UserManager.getPlayerNames();
|
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
default:
|
default:
|
||||||
return ImmutableList.of();
|
return ImmutableList.of();
|
||||||
@@ -83,8 +81,9 @@ public class McrankCommand implements TabExecutor {
|
|||||||
private void display(CommandSender sender, String playerName) {
|
private void display(CommandSender sender, String playerName) {
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||||
|
long cooldownMillis = Math.max(Config.getInstance().getDatabasePlayerCooldown(), 1750);
|
||||||
|
|
||||||
if (mcMMOPlayer.getDatabaseATS() + Misc.PLAYER_DATABASE_COOLDOWN_MILLIS > System.currentTimeMillis()) {
|
if (mcMMOPlayer.getDatabaseATS() + cooldownMillis > System.currentTimeMillis()) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
|||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.runnables.commands.MctopCommandAsyncTask;
|
import com.gmail.nossr50.runnables.commands.MctopCommandAsyncTask;
|
||||||
import com.gmail.nossr50.util.Misc;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.StringUtils;
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
@@ -85,8 +84,9 @@ public class MctopCommand implements TabExecutor {
|
|||||||
|
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||||
|
long cooldownMillis = Math.max(Config.getInstance().getDatabasePlayerCooldown(), 1750);
|
||||||
|
|
||||||
if (mcMMOPlayer.getDatabaseATS() + Misc.PLAYER_DATABASE_COOLDOWN_MILLIS > System.currentTimeMillis()) {
|
if (mcMMOPlayer.getDatabaseATS() + cooldownMillis > System.currentTimeMillis()) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,205 @@
|
|||||||
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.HolidayManager.FakeSkillType;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class AprilCommand implements TabExecutor {
|
||||||
|
private String skillName;
|
||||||
|
|
||||||
|
protected DecimalFormat percent = new DecimalFormat("##0.00%");
|
||||||
|
protected DecimalFormat decimal = new DecimalFormat("##0.00");
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
skillName = StringUtils.getCapitalized(label);
|
||||||
|
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
Player player = (Player) sender;
|
||||||
|
FakeSkillType fakeSkillType = FakeSkillType.getByName(skillName);
|
||||||
|
|
||||||
|
float skillValue = Misc.getRandom().nextInt(99);
|
||||||
|
|
||||||
|
player.sendMessage(LocaleLoader.getString("Skills.Header", skillName));
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.XPGain", getXPGainString(fakeSkillType)));
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Level", (int) skillValue, Misc.getRandom().nextInt(1000), 1000 + Misc.getRandom().nextInt(1000)));
|
||||||
|
|
||||||
|
|
||||||
|
List<String> effectMessages = effectsDisplay(fakeSkillType);
|
||||||
|
|
||||||
|
if (!effectMessages.isEmpty()) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Effects.Effects")));
|
||||||
|
|
||||||
|
for (String message : effectMessages) {
|
||||||
|
player.sendMessage(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> statsMessages = statsDisplay(fakeSkillType);
|
||||||
|
|
||||||
|
if (!statsMessages.isEmpty()) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Commands.Stats.Self")));
|
||||||
|
|
||||||
|
for (String message : statsMessages) {
|
||||||
|
player.sendMessage(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
player.sendMessage(LocaleLoader.formatString("[[DARK_AQUA]]Guide for {0} available - type /APRIL FOOLS ! :D", skillName));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getXPGainString(FakeSkillType fakeSkillType) {
|
||||||
|
switch (fakeSkillType) {
|
||||||
|
case MACHO:
|
||||||
|
return "Get beaten up";
|
||||||
|
case JUMPING:
|
||||||
|
return "Kris Kross will make ya Jump Jump";
|
||||||
|
case THROWING:
|
||||||
|
return "Chuck your items on the floor";
|
||||||
|
case WRECKING:
|
||||||
|
return "I'M GONNA WRECK IT!";
|
||||||
|
case CRAFTING:
|
||||||
|
return "Craft apple pies";
|
||||||
|
case WALKING:
|
||||||
|
return "Walk around the park";
|
||||||
|
case SWIMMING:
|
||||||
|
return "Like a fish on a bicycle";
|
||||||
|
case FALLING:
|
||||||
|
return "Faceplant the floor, headbutt the ground";
|
||||||
|
case CLIMBING:
|
||||||
|
return "Climb the highest mountain";
|
||||||
|
case FLYING:
|
||||||
|
return "I believe I can fly";
|
||||||
|
case DIVING:
|
||||||
|
return "Scuba club 4000";
|
||||||
|
case PIGGY:
|
||||||
|
return "OINK! OINK!";
|
||||||
|
default:
|
||||||
|
return "Sit and wait?";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
return ImmutableList.of("?");
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> effectsDisplay(FakeSkillType fakeSkillType) {
|
||||||
|
List<String> messages = new ArrayList<String>();
|
||||||
|
|
||||||
|
switch (fakeSkillType) {
|
||||||
|
case MACHO:
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Punching bag", "Absorb damage, like a bag of sand"));
|
||||||
|
break;
|
||||||
|
case JUMPING:
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Jump", "PRESS SPACE TO JUMP"));
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Jump Twice", "PRESS SPACE TWICE TO JUMP TWICE"));
|
||||||
|
break;
|
||||||
|
case THROWING:
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Drop Item", "Randomly drop items, at random"));
|
||||||
|
break;
|
||||||
|
case WRECKING:
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Ralphinator", "Smash windows with your fists"));
|
||||||
|
break;
|
||||||
|
case CRAFTING:
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Crafting", "Chance of successful craft"));
|
||||||
|
break;
|
||||||
|
case WALKING:
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Walk", "Traveling gracefully by foot"));
|
||||||
|
break;
|
||||||
|
case SWIMMING:
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Swim", "Just keep swimming, swimming, swimming"));
|
||||||
|
break;
|
||||||
|
case FALLING:
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Skydiving", "Go jump of a cliff. No, seriously."));
|
||||||
|
break;
|
||||||
|
case CLIMBING:
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Rock Climber", "Use string to climb mountains faster"));
|
||||||
|
break;
|
||||||
|
case FLYING:
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Fly", "Throw yourself at the ground and miss"));
|
||||||
|
break;
|
||||||
|
case DIVING:
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Hold Breath", "Press shift to hold your breath longer"));
|
||||||
|
break;
|
||||||
|
case PIGGY:
|
||||||
|
messages.add(LocaleLoader.getString("Effects.Template", "Carrot Turbo", "Supercharge your pigs with carrots"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return messages;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> statsDisplay(FakeSkillType fakeSkillType) {
|
||||||
|
List<String> messages = new ArrayList<String>();
|
||||||
|
|
||||||
|
switch (fakeSkillType) {
|
||||||
|
case MACHO:
|
||||||
|
messages.add(LocaleLoader.formatString("[[RED]]Damage Taken: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(77))));
|
||||||
|
break;
|
||||||
|
case JUMPING:
|
||||||
|
messages.add(LocaleLoader.formatString("[[RED]]Double Jump Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||||
|
break;
|
||||||
|
case THROWING:
|
||||||
|
messages.add(LocaleLoader.formatString("[[RED]]Drop Item Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(87))));
|
||||||
|
break;
|
||||||
|
case WRECKING:
|
||||||
|
messages.add(LocaleLoader.formatString("[[RED]]Wrecking Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(14))));
|
||||||
|
break;
|
||||||
|
case CRAFTING:
|
||||||
|
messages.add(LocaleLoader.formatString("[[RED]]Crafting Success: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||||
|
break;
|
||||||
|
case WALKING:
|
||||||
|
messages.add(LocaleLoader.formatString("[[RED]]Walk Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||||
|
break;
|
||||||
|
case SWIMMING:
|
||||||
|
messages.add(LocaleLoader.formatString("[[RED]]Swim Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||||
|
break;
|
||||||
|
case FALLING:
|
||||||
|
messages.add(LocaleLoader.formatString("[[RED]]Skydiving Success: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(37))));
|
||||||
|
break;
|
||||||
|
case CLIMBING:
|
||||||
|
messages.add(LocaleLoader.formatString("[[RED]]Rock Climber Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||||
|
break;
|
||||||
|
case FLYING:
|
||||||
|
messages.add(LocaleLoader.formatString("[[RED]]Fly Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||||
|
break;
|
||||||
|
case DIVING:
|
||||||
|
messages.add(LocaleLoader.formatString("[[RED]]Hold Breath Chance: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(27))));
|
||||||
|
break;
|
||||||
|
case PIGGY:
|
||||||
|
messages.add(LocaleLoader.formatString("[[RED]]Carrot Turbo Boost: [[YELLOW]]{0}%", decimal.format(Misc.getRandom().nextInt(80)) + 10));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return messages;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -51,7 +51,6 @@ public class FishingCommand extends SkillCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||||
FishingManager fishingManager = UserManager.getPlayer(player).getFishingManager();
|
FishingManager fishingManager = UserManager.getPlayer(player).getFishingManager();
|
||||||
boolean isStorming = player.getWorld().hasStorm();
|
|
||||||
|
|
||||||
// TREASURE HUNTER
|
// TREASURE HUNTER
|
||||||
if (canTreasureHunt) {
|
if (canTreasureHunt) {
|
||||||
@@ -70,7 +69,7 @@ public class FishingCommand extends SkillCommand {
|
|||||||
double totalEnchantChance = 0;
|
double totalEnchantChance = 0;
|
||||||
|
|
||||||
for (Rarity rarity : Rarity.values()) {
|
for (Rarity rarity : Rarity.values()) {
|
||||||
if (rarity != Rarity.TRAP || rarity != Rarity.RECORD) {
|
if (rarity != Rarity.TRAP && rarity != Rarity.RECORD) {
|
||||||
totalEnchantChance += TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, rarity);
|
totalEnchantChance += TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, rarity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -92,16 +91,14 @@ public class FishingCommand extends SkillCommand {
|
|||||||
|
|
||||||
// MASTER ANGLER
|
// MASTER ANGLER
|
||||||
if (canMasterAngler) {
|
if (canMasterAngler) {
|
||||||
double rawBiteChance = 1.0 / (isStorming ? 300 : 500);
|
double rawBiteChance = 1.0 / (player.getWorld().hasStorm() ? 300 : 500);
|
||||||
Location location = fishingManager.getHookLocation();
|
Location location = fishingManager.getHookLocation();
|
||||||
|
|
||||||
if (location == null) {
|
if (location == null) {
|
||||||
location = player.getLocation();
|
location = player.getLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
Biome biome = location.getBlock().getBiome();
|
if (Fishing.masterAnglerBiomes.contains(location.getBlock().getBiome())) {
|
||||||
|
|
||||||
if (biome == Biome.RIVER || biome == Biome.OCEAN) {
|
|
||||||
rawBiteChance = rawBiteChance * AdvancedConfig.getInstance().getMasterAnglerBiomeModifier();
|
rawBiteChance = rawBiteChance * AdvancedConfig.getInstance().getMasterAnglerBiomeModifier();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import java.text.DecimalFormat;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.gmail.nossr50.util.Motd;
|
|
||||||
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;
|
||||||
@@ -18,6 +17,7 @@ import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
|||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.child.FamilyTree;
|
import com.gmail.nossr50.skills.child.FamilyTree;
|
||||||
|
import com.gmail.nossr50.util.Motd;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.StringUtils;
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
|||||||
@@ -91,9 +91,9 @@ public class TamingCommand extends SkillCommand {
|
|||||||
|
|
||||||
if (canCallWild) {
|
if (canCallWild) {
|
||||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.12"), LocaleLoader.getString("Taming.Effect.13")));
|
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.12"), LocaleLoader.getString("Taming.Effect.13")));
|
||||||
messages.add(LocaleLoader.getString("Taming.Effect.14", Config.getInstance().getTamingCOTWOcelotCost()));
|
messages.add(LocaleLoader.getString("Taming.Effect.14", Config.getInstance().getTamingCOTWCost(EntityType.OCELOT)));
|
||||||
messages.add(LocaleLoader.getString("Taming.Effect.15", Config.getInstance().getTamingCOTWWolfCost()));
|
messages.add(LocaleLoader.getString("Taming.Effect.15", Config.getInstance().getTamingCOTWCost(EntityType.WOLF)));
|
||||||
messages.add(LocaleLoader.getString("Taming.Effect.20", Config.getInstance().getTamingCOTWHorseCost()));
|
messages.add(LocaleLoader.getString("Taming.Effect.20", Config.getInstance().getTamingCOTWCost(EntityType.HORSE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return messages;
|
return messages;
|
||||||
|
|||||||
@@ -777,6 +777,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
public int getSharpenedClawsUnlock() { return config.getInt("Skills.Taming.SharpenedClaws.UnlockLevel", 750); }
|
public int getSharpenedClawsUnlock() { return config.getInt("Skills.Taming.SharpenedClaws.UnlockLevel", 750); }
|
||||||
public double getSharpenedClawsBonus() { return config.getDouble("Skills.Taming.SharpenedClaws.Bonus", 2.0D); }
|
public double getSharpenedClawsBonus() { return config.getDouble("Skills.Taming.SharpenedClaws.Bonus", 2.0D); }
|
||||||
|
|
||||||
|
public double getMinHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MinHorseJumpStrength", 0.7D); }
|
||||||
public double getMaxHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MaxHorseJumpStrength", 2.0D); }
|
public double getMaxHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MaxHorseJumpStrength", 2.0D); }
|
||||||
|
|
||||||
/* UNARMED */
|
/* UNARMED */
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.TreeSpecies;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
|
||||||
@@ -182,20 +183,40 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
reason.add("Cannot use the same item for Repair and Salvage anvils!");
|
reason.add("Cannot use the same item for Repair and Salvage anvils!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getTamingCOTWWolfCost() < 1) {
|
if (getTamingCOTWMaterial(EntityType.WOLF) == null) {
|
||||||
reason.add("Skills.Taming.Call_Of_The_Wild.Bones_Required should be at least 1!");
|
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf.Item_Material is invalid!!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getTamingCOTWOcelotCost() < 1) {
|
if (getTamingCOTWMaterial(EntityType.OCELOT) == null) {
|
||||||
reason.add("Skills.Taming.Call_Of_The_Wild.Fish_Required should be at least 1!");
|
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot.Item_Material is invalid!!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getTamingCOTWAmount(EntityType.OCELOT) <= 0) {
|
if (getTamingCOTWMaterial(EntityType.HORSE) == null) {
|
||||||
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot_Amount should be greater than 0!");
|
reason.add("Skills.Taming.Call_Of_The_Wild.Horse.Item_Material is invalid!!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getTamingCOTWCost(EntityType.WOLF) <= 0) {
|
||||||
|
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf.Item_Amount should be greater than 0!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getTamingCOTWCost(EntityType.OCELOT) <= 0) {
|
||||||
|
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot.Item_Amount should be greater than 0!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getTamingCOTWCost(EntityType.HORSE) <= 0) {
|
||||||
|
reason.add("Skills.Taming.Call_Of_The_Wild.Horse.Item_Amount should be greater than 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getTamingCOTWAmount(EntityType.WOLF) <= 0) {
|
if (getTamingCOTWAmount(EntityType.WOLF) <= 0) {
|
||||||
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf_Amount should be greater than 0!");
|
reason.add("Skills.Taming.Call_Of_The_Wild.Wolf.Summon_Amount should be greater than 0!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getTamingCOTWAmount(EntityType.OCELOT) <= 0) {
|
||||||
|
reason.add("Skills.Taming.Call_Of_The_Wild.Ocelot.Summon_Amount should be greater than 0!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getTamingCOTWAmount(EntityType.HORSE) <= 0) {
|
||||||
|
reason.add("Skills.Taming.Call_Of_The_Wild.Horse.Summon_Amount should be greater than 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
return noErrorsInConfig(reason);
|
return noErrorsInConfig(reason);
|
||||||
@@ -218,7 +239,6 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public boolean getPreferBeta() { return config.getBoolean("General.Prefer_Beta", false); }
|
public boolean getPreferBeta() { return config.getBoolean("General.Prefer_Beta", false); }
|
||||||
public boolean getEventCallbackEnabled() { return config.getBoolean("General.Event_Callback", true); }
|
public boolean getEventCallbackEnabled() { return config.getBoolean("General.Event_Callback", true); }
|
||||||
public boolean getVerboseLoggingEnabled() { return config.getBoolean("General.Verbose_Logging", false); }
|
public boolean getVerboseLoggingEnabled() { return config.getBoolean("General.Verbose_Logging", false); }
|
||||||
public boolean getConfigOverwriteEnabled() { return config.getBoolean("General.Config_Update_Overwrite", true); }
|
|
||||||
|
|
||||||
public String getPartyChatPrefix() { return config.getString("Commands.partychat.Chat_Prefix_Format", "[[GREEN]]([[WHITE]]{0}[[GREEN]])"); }
|
public String getPartyChatPrefix() { return config.getString("Commands.partychat.Chat_Prefix_Format", "[[GREEN]]([[WHITE]]{0}[[GREEN]])"); }
|
||||||
public boolean getPartyChatColorLeaderName() { return config.getBoolean("Commands.partychat.Gold_Leader_Name", true); }
|
public boolean getPartyChatColorLeaderName() { return config.getBoolean("Commands.partychat.Gold_Leader_Name", true); }
|
||||||
@@ -229,6 +249,7 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public boolean getAdminDisplayNames() { return config.getBoolean("Commands.adminchat.Use_Display_Names", true); }
|
public boolean getAdminDisplayNames() { return config.getBoolean("Commands.adminchat.Use_Display_Names", true); }
|
||||||
|
|
||||||
public boolean getMatchOfflinePlayers() { return config.getBoolean("Commands.Generic.Match_OfflinePlayers", false); }
|
public boolean getMatchOfflinePlayers() { return config.getBoolean("Commands.Generic.Match_OfflinePlayers", false); }
|
||||||
|
public long getDatabasePlayerCooldown() { return config.getLong("Commands.Database.Player_Cooldown", 1750); }
|
||||||
|
|
||||||
public boolean getLevelUpSoundsEnabled() { return config.getBoolean("General.LevelUp_Sounds", true); }
|
public boolean getLevelUpSoundsEnabled() { return config.getBoolean("General.LevelUp_Sounds", true); }
|
||||||
|
|
||||||
@@ -423,7 +444,7 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
|
|
||||||
/* Acrobatics */
|
/* Acrobatics */
|
||||||
public boolean getDodgeLightningDisabled() { return config.getBoolean("Skills.Acrobatics.Prevent_Dodge_Lightning", false); }
|
public boolean getDodgeLightningDisabled() { return config.getBoolean("Skills.Acrobatics.Prevent_Dodge_Lightning", false); }
|
||||||
public boolean getPreventXPAfterTeleport() { return config.getBoolean("Skills.Acrobatics.Prevent_XP_After_Teleport", true); }
|
public int getXPAfterTeleportCooldown() { return config.getInt("Skills.Acrobatics.XP_After_Teleport_Cooldown", 5); }
|
||||||
|
|
||||||
/* Alchemy */
|
/* Alchemy */
|
||||||
public boolean getEnabledForHoppers() { return config.getBoolean("Skills.Alchemy.Enabled_for_Hoppers", true); }
|
public boolean getEnabledForHoppers() { return config.getBoolean("Skills.Alchemy.Enabled_for_Hoppers", true); }
|
||||||
@@ -431,6 +452,8 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
|
|
||||||
/* Fishing */
|
/* Fishing */
|
||||||
public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); }
|
public boolean getFishingDropsEnabled() { return config.getBoolean("Skills.Fishing.Drops_Enabled", true); }
|
||||||
|
public boolean getFishingOverrideTreasures() { return config.getBoolean("Skills.Fishing.Override_Vanilla_Treasures", true); }
|
||||||
|
public boolean getFishingExtraFish() { return config.getBoolean("Skills.Fishing.Extra_Fish", true); }
|
||||||
|
|
||||||
/* Mining */
|
/* Mining */
|
||||||
public Material getDetonatorItem() { return Material.matchMaterial(config.getString("Skills.Mining.Detonator_Name", "FLINT_AND_STEEL")); }
|
public Material getDetonatorItem() { return Material.matchMaterial(config.getString("Skills.Mining.Detonator_Name", "FLINT_AND_STEEL")); }
|
||||||
@@ -449,17 +472,13 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public boolean getUnarmedBlockCrackerSmoothbrickToCracked() { return config.getBoolean("Skills.Unarmed.Block_Cracker.SmoothBrick_To_CrackedBrick", true); }
|
public boolean getUnarmedBlockCrackerSmoothbrickToCracked() { return config.getBoolean("Skills.Unarmed.Block_Cracker.SmoothBrick_To_CrackedBrick", true); }
|
||||||
|
|
||||||
/* Taming */
|
/* Taming */
|
||||||
public int getTamingCOTWHorseCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Apples_Required", 10); }
|
public Material getTamingCOTWMaterial(EntityType type) { return Material.matchMaterial(config.getString("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Material")); }
|
||||||
public int getTamingCOTWWolfCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10); }
|
public int getTamingCOTWCost(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Item_Amount"); }
|
||||||
public int getTamingCOTWOcelotCost() { return config.getInt("Skills.Taming.Call_Of_The_Wild.Fish_Required", 10); }
|
public int getTamingCOTWAmount(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type) + ".Summon_Amount"); }
|
||||||
public double getTamingCOTWRange() { return config.getDouble("Skills.Taming.Call_Of_The_Wild.Range", 40.0D); }
|
public double getTamingCOTWRange() { return config.getDouble("Skills.Taming.Call_Of_The_Wild.Range", 40.0D); }
|
||||||
public int getTamingCOTWAmount(EntityType type) { return config.getInt("Skills.Taming.Call_Of_The_Wild." + StringUtils.getPrettyEntityTypeString(type)+ "_Amount"); }
|
|
||||||
|
|
||||||
/* Woodcutting */
|
/* Woodcutting */
|
||||||
public boolean getOakDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Oak", true); }
|
public boolean getWoodcuttingDoubleDropsEnabled(TreeSpecies species) { return config.getBoolean("Double_Drops.Woodcutting." + StringUtils.getPrettyTreeSpeciesString(species).replace(" ", "_")); }
|
||||||
public boolean getBirchDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Birch", true); }
|
|
||||||
public boolean getSpruceDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Spruce", true); }
|
|
||||||
public boolean getJungleDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Woodcutting.Jungle", true); }
|
|
||||||
public boolean getTreeFellerSoundsEnabled() { return config.getBoolean("Skills.Woodcutting.Tree_Feller_Sounds", true); }
|
public boolean getTreeFellerSoundsEnabled() { return config.getBoolean("Skills.Woodcutting.Tree_Feller_Sounds", true); }
|
||||||
|
|
||||||
/* AFK Leveling */
|
/* AFK Leveling */
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.TreeSpecies;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
import org.bukkit.material.LongGrass;
|
||||||
|
import org.bukkit.material.MaterialData;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.AutoUpdateConfigLoader;
|
import com.gmail.nossr50.config.AutoUpdateConfigLoader;
|
||||||
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||||
@@ -103,9 +106,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Fishing */
|
/* Fishing */
|
||||||
if (getFishingBaseXP() <= 0) {
|
// TODO: Add validation for each fish type once enum is available.
|
||||||
reason.add("Experience.Fishing.Base should be greater than 0!");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (getFishingShakeXP() <= 0) {
|
if (getFishingShakeXP() <= 0) {
|
||||||
reason.add("Experience.Fishing.Shake should be greater than 0!");
|
reason.add("Experience.Fishing.Shake should be greater than 0!");
|
||||||
@@ -126,20 +127,12 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Woodcutting */
|
/* Woodcutting */
|
||||||
if (getWoodcuttingXPOak() <= 0) {
|
for (TreeSpecies species : TreeSpecies.values()) {
|
||||||
reason.add("Experience.Woodcutting.Oak should be greater than 0!");
|
String key = "Experience.Woodcutting." + StringUtils.getPrettyTreeSpeciesString(species).replace(" ", "_");
|
||||||
}
|
|
||||||
|
|
||||||
if (getWoodcuttingXPBirch() <= 0) {
|
if (config.getInt(key) <= 0) {
|
||||||
reason.add("Experience.Woodcutting.Birch should be greater than 0!");
|
reason.add(key + " should be greater than 0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getWoodcuttingXPSpruce() <= 0) {
|
|
||||||
reason.add("Experience.Woodcutting.Spruce should be greater than 0!");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (getWoodcuttingXPJungle() <= 0) {
|
|
||||||
reason.add("Experience.Woodcutting.Jungle should be greater than 0!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getWoodcuttingXPHugeBrownMushroom() <= 0) {
|
if (getWoodcuttingXPHugeBrownMushroom() <= 0) {
|
||||||
@@ -211,9 +204,108 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
public double getPotionXP() { return config.getDouble("Experience.Alchemy.Potion", 150D); }
|
public double getPotionXP() { return config.getDouble("Experience.Alchemy.Potion", 150D); }
|
||||||
|
|
||||||
/* Fishing */
|
/* Fishing */
|
||||||
public int getFishingBaseXP() { return config.getInt("Experience.Fishing.Base", 800); }
|
public int getFishXp(MaterialData data) {
|
||||||
|
switch (data.getData()) {
|
||||||
|
case 0x0:
|
||||||
|
return config.getInt("Experience.Fishing.Raw_Fish", 800);
|
||||||
|
|
||||||
|
case 0x1:
|
||||||
|
return config.getInt("Experience.Fishing.Raw_Salmon", 800);
|
||||||
|
|
||||||
|
case 0x2:
|
||||||
|
return config.getInt("Experience.Fishing.Clownfish", 800);
|
||||||
|
|
||||||
|
case 0x3:
|
||||||
|
return config.getInt("Experience.Fishing.Pufferfish", 800);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public int getFishingShakeXP() { return config.getInt("Experience.Fishing.Shake", 50); }
|
public int getFishingShakeXP() { return config.getInt("Experience.Fishing.Shake", 50); }
|
||||||
|
|
||||||
|
/* Herbalism */
|
||||||
|
public int getFlowerAndGrassXp(MaterialData data) {
|
||||||
|
Material type = data.getItemType();
|
||||||
|
|
||||||
|
if (type == Material.RED_ROSE) {
|
||||||
|
switch (data.getData()) {
|
||||||
|
case 0x0:
|
||||||
|
return config.getInt("Experience.Herbalism.Poppy", 100);
|
||||||
|
|
||||||
|
case 0x1:
|
||||||
|
return config.getInt("Experience.Herbalism.Blue_Orchid", 150);
|
||||||
|
|
||||||
|
case 0x2:
|
||||||
|
return config.getInt("Experience.Herbalism.Allium", 300);
|
||||||
|
|
||||||
|
case 0x3:
|
||||||
|
return config.getInt("Experience.Herbalism.Azure_Bluet", 150);
|
||||||
|
|
||||||
|
case 0x4:
|
||||||
|
return config.getInt("Experience.Herbalism.Red_Tulip", 150);
|
||||||
|
|
||||||
|
case 0x5:
|
||||||
|
return config.getInt("Experience.Herbalism.Orange_Tulip", 150);
|
||||||
|
|
||||||
|
case 0x6:
|
||||||
|
return config.getInt("Experience.Herbalism.White_Tulip", 150);
|
||||||
|
|
||||||
|
case 0x7:
|
||||||
|
return config.getInt("Experience.Herbalism.Pink_Tulip", 150);
|
||||||
|
|
||||||
|
case 0x8:
|
||||||
|
return config.getInt("Experience.Herbalism.Oxeye_Daisy", 150);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (type == Material.LONG_GRASS) {
|
||||||
|
switch (((LongGrass) data).getSpecies()) {
|
||||||
|
case DEAD:
|
||||||
|
return config.getInt("Experience.Herbalism.Dead_Bush", 30);
|
||||||
|
|
||||||
|
case FERN_LIKE:
|
||||||
|
return config.getInt("Experience.Herbalism.Small_Fern", 10);
|
||||||
|
|
||||||
|
case NORMAL:
|
||||||
|
return config.getInt("Experience.Herbalism.Small_Grass", 10);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (type == Material.DOUBLE_PLANT) {
|
||||||
|
switch (data.getData()) {
|
||||||
|
case 0x0:
|
||||||
|
return config.getInt("Experience.Herbalism.Sunflower", 50);
|
||||||
|
|
||||||
|
case 0x1:
|
||||||
|
return config.getInt("Experience.Herbalism.Lilac", 50);
|
||||||
|
|
||||||
|
case 0x2:
|
||||||
|
return config.getInt("Experience.Herbalism.Tall_Grass", 50);
|
||||||
|
|
||||||
|
case 0x3:
|
||||||
|
return config.getInt("Experience.Herbalism.Tall_Fern", 50);
|
||||||
|
|
||||||
|
case 0x4:
|
||||||
|
return config.getInt("Experience.Herbalism.Rose_Bush", 50);
|
||||||
|
|
||||||
|
case 0x5:
|
||||||
|
return config.getInt("Experience.Herbalism.Peony", 50);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Repair */
|
/* Repair */
|
||||||
public double getRepairXPBase() { return config.getDouble("Experience.Repair.Base", 1000.0); }
|
public double getRepairXPBase() { return config.getDouble("Experience.Repair.Base", 1000.0); }
|
||||||
public double getRepairXP(RepairMaterialType repairMaterialType) { return config.getDouble("Experience.Repair." + StringUtils.getCapitalized(repairMaterialType.toString())); }
|
public double getRepairXP(RepairMaterialType repairMaterialType) { return config.getDouble("Experience.Repair." + StringUtils.getCapitalized(repairMaterialType.toString())); }
|
||||||
@@ -224,10 +316,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
public int getTamingXPOcelot() { return config.getInt("Experience.Taming.Animal_Taming.Ocelot", 500); }
|
public int getTamingXPOcelot() { return config.getInt("Experience.Taming.Animal_Taming.Ocelot", 500); }
|
||||||
|
|
||||||
/* Woodcutting */
|
/* Woodcutting */
|
||||||
public int getWoodcuttingXPOak() { return config.getInt("Experience.Woodcutting.Oak", 70); }
|
public int getWoodcuttingTreeXP(TreeSpecies species) { return config.getInt("Experience.Woodcutting." + StringUtils.getPrettyTreeSpeciesString(species).replace(" ", "_")); }
|
||||||
public int getWoodcuttingXPBirch() { return config.getInt("Experience.Woodcutting.Birch", 90); }
|
|
||||||
public int getWoodcuttingXPSpruce() { return config.getInt("Experience.Woodcutting.Spruce", 80); }
|
|
||||||
public int getWoodcuttingXPJungle() { return config.getInt("Experience.Woodcutting.Jungle", 100); }
|
|
||||||
public int getWoodcuttingXPHugeBrownMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Brown", 70); }
|
public int getWoodcuttingXPHugeBrownMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Brown", 70); }
|
||||||
public int getWoodcuttingXPHugeRedMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Red", 70); }
|
public int getWoodcuttingXPHugeRedMushroom() { return config.getInt("Experience.Woodcutting.Huge_Mushroom_Red", 70); }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.gmail.nossr50.skills.alchemy.Alchemy;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
public List<ExcavationTreasure> excavationFromMycel = new ArrayList<ExcavationTreasure>();
|
public List<ExcavationTreasure> excavationFromMycel = new ArrayList<ExcavationTreasure>();
|
||||||
public List<ExcavationTreasure> excavationFromSoulSand = new ArrayList<ExcavationTreasure>();
|
public List<ExcavationTreasure> excavationFromSoulSand = new ArrayList<ExcavationTreasure>();
|
||||||
public List<ExcavationTreasure> excavationFromSnow = new ArrayList<ExcavationTreasure>();
|
public List<ExcavationTreasure> excavationFromSnow = new ArrayList<ExcavationTreasure>();
|
||||||
|
public List<ExcavationTreasure> excavationFromRedSand = new ArrayList<ExcavationTreasure>();
|
||||||
|
public List<ExcavationTreasure> excavationFromPodzol = new ArrayList<ExcavationTreasure>();
|
||||||
|
|
||||||
public List<HylianTreasure> hylianFromBushes = new ArrayList<HylianTreasure>();
|
public List<HylianTreasure> hylianFromBushes = new ArrayList<HylianTreasure>();
|
||||||
public List<HylianTreasure> hylianFromFlowers = new ArrayList<HylianTreasure>();
|
public List<HylianTreasure> hylianFromFlowers = new ArrayList<HylianTreasure>();
|
||||||
@@ -371,6 +373,14 @@ public class TreasureConfig extends ConfigLoader {
|
|||||||
if (dropList.contains("Snow")) {
|
if (dropList.contains("Snow")) {
|
||||||
excavationFromSnow.add(excavationTreasure);
|
excavationFromSnow.add(excavationTreasure);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dropList.contains("Red_Sand")) {
|
||||||
|
excavationFromRedSand.add(excavationTreasure);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dropList.contains("Podzol")) {
|
||||||
|
excavationFromPodzol.add(excavationTreasure);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (isHylian) {
|
else if (isHylian) {
|
||||||
HylianTreasure hylianTreasure = new HylianTreasure(item, xp, dropChance, dropLevel);
|
HylianTreasure hylianTreasure = new HylianTreasure(item, xp, dropChance, dropLevel);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public interface DatabaseManager {
|
|||||||
/**
|
/**
|
||||||
* Retrieve leaderboard info.
|
* Retrieve leaderboard info.
|
||||||
*
|
*
|
||||||
* @param skillName The skill to retrieve info on
|
* @param skill The skill to retrieve info on
|
||||||
* @param pageNumber Which page in the leaderboards to retrieve
|
* @param pageNumber Which page in the leaderboards to retrieve
|
||||||
* @param statsPerPage The number of stats per page
|
* @param statsPerPage The number of stats per page
|
||||||
* @return the requested leaderboard information
|
* @return the requested leaderboard information
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ import java.util.HashSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
|
||||||
|
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@@ -30,6 +28,8 @@ import com.gmail.nossr50.datatypes.skills.SkillType;
|
|||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.StringUtils;
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
|
|
||||||
public final class FlatfileDatabaseManager implements DatabaseManager {
|
public final class FlatfileDatabaseManager implements DatabaseManager {
|
||||||
private final HashMap<SkillType, List<PlayerStat>> playerStatHash = new HashMap<SkillType, List<PlayerStat>>();
|
private final HashMap<SkillType, List<PlayerStat>> playerStatHash = new HashMap<SkillType, List<PlayerStat>>();
|
||||||
private final List<PlayerStat> powerLevels = new ArrayList<PlayerStat>();
|
private final List<PlayerStat> powerLevels = new ArrayList<PlayerStat>();
|
||||||
@@ -814,7 +814,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private PlayerProfile loadFromLine(String[] character) throws Exception {
|
private PlayerProfile loadFromLine(String[] character) {
|
||||||
Map<SkillType, Integer> skills = getSkillMapFromLine(character); // Skill levels
|
Map<SkillType, Integer> skills = getSkillMapFromLine(character); // Skill levels
|
||||||
Map<SkillType, Float> skillsXp = new HashMap<SkillType, Float>(); // Skill & XP
|
Map<SkillType, Float> skillsXp = new HashMap<SkillType, Float>(); // Skill & XP
|
||||||
Map<AbilityType, Integer> skillsDATS = new HashMap<AbilityType, Integer>(); // Ability & Cooldown
|
Map<AbilityType, Integer> skillsDATS = new HashMap<AbilityType, Integer>(); // Ability & Cooldown
|
||||||
|
|||||||
@@ -799,7 +799,6 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ResultSet resultSet;
|
ResultSet resultSet;
|
||||||
HashMap<Integer, ArrayList<String>> rows = new HashMap<Integer, ArrayList<String>>();
|
|
||||||
PreparedStatement statement = null;
|
PreparedStatement statement = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -811,13 +810,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
resultSet = statement.executeQuery();
|
resultSet = statement.executeQuery();
|
||||||
|
|
||||||
while (resultSet.next()) {
|
while (resultSet.next()) {
|
||||||
ArrayList<String> column = new ArrayList<String>();
|
// No reason to do anything here... we're just trying to catch exceptions
|
||||||
|
|
||||||
for (int i = 1; i <= resultSet.getMetaData().getColumnCount(); i++) {
|
|
||||||
column.add(resultSet.getString(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
rows.put(resultSet.getRow(), column);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SQLException ex) {
|
catch (SQLException ex) {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@@ -83,6 +84,19 @@ public class Party {
|
|||||||
return onlineMembers;
|
return onlineMembers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getOnlinePlayerNames(CommandSender sender) {
|
||||||
|
Player player = sender instanceof Player ? (Player) sender : null;
|
||||||
|
List<String> onlinePlayerNames = new ArrayList<String>();
|
||||||
|
|
||||||
|
for (Player onlinePlayer : getOnlineMembers()) {
|
||||||
|
if (player != null && player.canSee(onlinePlayer)) {
|
||||||
|
onlinePlayerNames.add(onlinePlayer.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return onlinePlayerNames;
|
||||||
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@@ -337,9 +351,4 @@ public class Party {
|
|||||||
|
|
||||||
return this.getName().equals(other.getName());
|
return this.getName().equals(other.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return super.hashCode();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ public class McMMOPlayer {
|
|||||||
private final Map<AbilityType, Boolean> abilityInformed = new HashMap<AbilityType, Boolean>();
|
private final Map<AbilityType, Boolean> abilityInformed = new HashMap<AbilityType, Boolean>();
|
||||||
|
|
||||||
private final Map<ToolType, Boolean> toolMode = new HashMap<ToolType, Boolean>();
|
private final Map<ToolType, Boolean> toolMode = new HashMap<ToolType, Boolean>();
|
||||||
private final Map<ToolType, Integer> toolATS = new HashMap<ToolType, Integer>();
|
|
||||||
|
|
||||||
private int recentlyHurt;
|
private int recentlyHurt;
|
||||||
private int respawnATS;
|
private int respawnATS;
|
||||||
@@ -122,7 +121,6 @@ public class McMMOPlayer {
|
|||||||
|
|
||||||
for (ToolType toolType : ToolType.values()) {
|
for (ToolType toolType : ToolType.values()) {
|
||||||
toolMode.put(toolType, false);
|
toolMode.put(toolType, false);
|
||||||
toolATS.put(toolType, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!profile.isLoaded()) {
|
if (!profile.isLoaded()) {
|
||||||
@@ -340,28 +338,6 @@ public class McMMOPlayer {
|
|||||||
toolMode.put(tool, isPrepared);
|
toolMode.put(tool, isPrepared);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the current prep ATS of a tool.
|
|
||||||
*
|
|
||||||
* @param tool Tool to get the ATS for
|
|
||||||
* @return the ATS for the tool
|
|
||||||
*/
|
|
||||||
public long getToolPreparationATS(ToolType tool) {
|
|
||||||
return toolATS.get(tool);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the current prep ATS of a tool.
|
|
||||||
*
|
|
||||||
* @param tool Tool to set the ATS for
|
|
||||||
* @param ATS the ATS of the tool
|
|
||||||
*/
|
|
||||||
public void setToolPreparationATS(ToolType tool, long ATS) {
|
|
||||||
int startTime = (int) (ATS / Misc.TIME_CONVERSION_FACTOR);
|
|
||||||
|
|
||||||
toolATS.put(tool, startTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recently Hurt
|
* Recently Hurt
|
||||||
*/
|
*/
|
||||||
@@ -594,10 +570,6 @@ public class McMMOPlayer {
|
|||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPlayer(Player player) {
|
|
||||||
this.player = player;
|
|
||||||
}
|
|
||||||
|
|
||||||
public PlayerProfile getProfile() {
|
public PlayerProfile getProfile() {
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
@@ -877,7 +849,6 @@ public class McMMOPlayer {
|
|||||||
player.sendMessage(tool.getRaiseTool());
|
player.sendMessage(tool.getRaiseTool());
|
||||||
}
|
}
|
||||||
|
|
||||||
setToolPreparationATS(tool, System.currentTimeMillis());
|
|
||||||
setToolPreparationMode(tool, true);
|
setToolPreparationMode(tool, true);
|
||||||
new ToolLowerTask(this, tool).runTaskLaterAsynchronously(mcMMO.p, 4 * Misc.TICK_CONVERSION_FACTOR);
|
new ToolLowerTask(this, tool).runTaskLaterAsynchronously(mcMMO.p, 4 * Misc.TICK_CONVERSION_FACTOR);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.gmail.nossr50.events.fake;
|
||||||
|
|
||||||
|
import org.bukkit.entity.AnimalTamer;
|
||||||
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
import org.bukkit.event.entity.EntityTameEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when mcMMO tames an animal via Call of the Wild
|
||||||
|
*/
|
||||||
|
public class FakeEntityTameEvent extends EntityTameEvent {
|
||||||
|
public FakeEntityTameEvent(LivingEntity entity, AnimalTamer owner) {
|
||||||
|
super (entity, owner);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ public class SecondaryAbilityWeightedActivationCheckEvent extends SecondaryAbili
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the activation chance of the ability 0D being no chance, 1.0D being 100% chance
|
* Gets the activation chance of the ability 0D being no chance, 1.0D being 100% chance
|
||||||
|
*
|
||||||
* @return The activation chance of the ability
|
* @return The activation chance of the ability
|
||||||
*/
|
*/
|
||||||
public double getChance() {
|
public double getChance() {
|
||||||
@@ -23,7 +24,8 @@ public class SecondaryAbilityWeightedActivationCheckEvent extends SecondaryAbili
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the activation chance of the ability [0D-1.0D]
|
* Sets the activation chance of the ability [0D-1.0D]
|
||||||
* @param The activation chance of the ability
|
*
|
||||||
|
* @param chance The activation chance of the ability
|
||||||
*/
|
*/
|
||||||
public void setChance(double chance) {
|
public void setChance(double chance) {
|
||||||
this.chance = chance;
|
this.chance = chance;
|
||||||
@@ -31,7 +33,8 @@ public class SecondaryAbilityWeightedActivationCheckEvent extends SecondaryAbili
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the activation chance of the ability to 100% or 0%
|
* Sets the activation chance of the ability to 100% or 0%
|
||||||
* @param whether it should be successful or not
|
*
|
||||||
|
* @param success whether it should be successful or not
|
||||||
*/
|
*/
|
||||||
public void setSuccessful(boolean success) {
|
public void setSuccessful(boolean success) {
|
||||||
this.chance = success ? 1.0D : 0D;
|
this.chance = success ? 1.0D : 0D;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.gmail.nossr50.listeners;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
@@ -66,7 +67,7 @@ public class BlockListener implements Listener {
|
|||||||
for (Block b : blocks) {
|
for (Block b : blocks) {
|
||||||
if (BlockUtils.shouldBeWatched(b.getState()) && mcMMO.getPlaceStore().isTrue(b)) {
|
if (BlockUtils.shouldBeWatched(b.getState()) && mcMMO.getPlaceStore().isTrue(b)) {
|
||||||
b.getRelative(direction).setMetadata(mcMMO.blockMetadataKey, mcMMO.metadataValue);
|
b.getRelative(direction).setMetadata(mcMMO.blockMetadataKey, mcMMO.metadataValue);
|
||||||
if (b.equals(futureEmptyBlock)) {
|
if (b.equals(futureEmptyBlock) && futureEmptyBlock.getType() == Material.AIR) {
|
||||||
mcMMO.getPlaceStore().setFalse(b);
|
mcMMO.getPlaceStore().setFalse(b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -89,10 +90,14 @@ public class BlockListener implements Listener {
|
|||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onBlockPistonRetract(BlockPistonRetractEvent event) {
|
public void onBlockPistonRetract(BlockPistonRetractEvent event) {
|
||||||
if (event.isSticky()) {
|
if (!event.isSticky()) {
|
||||||
// Needed only because under some circumstances Minecraft doesn't move the block
|
return;
|
||||||
new StickyPistonTrackerTask(event.getDirection(), event.getBlock()).runTaskLater(plugin, 2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Block movedBlock = event.getRetractLocation().getBlock();
|
||||||
|
|
||||||
|
// Needed only because under some circumstances Minecraft doesn't move the block
|
||||||
|
new StickyPistonTrackerTask(event.getDirection(), event.getBlock(), movedBlock).runTaskLater(plugin, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -132,14 +137,15 @@ public class BlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BlockState blockState = event.getBlock().getState();
|
BlockState blockState = event.getBlock().getState();
|
||||||
|
Location location = blockState.getLocation();
|
||||||
|
|
||||||
if (!BlockUtils.shouldBeWatched(blockState)) {
|
if (!BlockUtils.shouldBeWatched(blockState)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ALCHEMY - Cancel any brew in progress for that BrewingStand */
|
/* ALCHEMY - Cancel any brew in progress for that BrewingStand */
|
||||||
if (blockState instanceof BrewingStand && Alchemy.brewingStandMap.containsKey(event.getBlock())) {
|
if (blockState instanceof BrewingStand && Alchemy.brewingStandMap.containsKey(location)) {
|
||||||
Alchemy.brewingStandMap.get(event.getBlock()).cancelBrew();
|
Alchemy.brewingStandMap.get(location).cancelBrew();
|
||||||
}
|
}
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
@@ -176,7 +182,7 @@ public class BlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* WOOD CUTTING */
|
/* WOOD CUTTING */
|
||||||
else if (BlockUtils.isLog(blockState) && SkillType.WOODCUTTING.getPermissions(player) && !mcMMO.getPlaceStore().isTrue(blockState)) {
|
else if (BlockUtils.isLog(blockState) && ItemUtils.isAxe(heldItem) && SkillType.WOODCUTTING.getPermissions(player) && !mcMMO.getPlaceStore().isTrue(blockState)) {
|
||||||
WoodcuttingManager woodcuttingManager = mcMMOPlayer.getWoodcuttingManager();
|
WoodcuttingManager woodcuttingManager = mcMMOPlayer.getWoodcuttingManager();
|
||||||
|
|
||||||
if (woodcuttingManager.canUseTreeFeller(heldItem)) {
|
if (woodcuttingManager.canUseTreeFeller(heldItem)) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import org.bukkit.block.Block;
|
|||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.AnimalTamer;
|
import org.bukkit.entity.AnimalTamer;
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
|
import org.bukkit.entity.Enderman;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.FallingBlock;
|
import org.bukkit.entity.FallingBlock;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
@@ -30,10 +31,11 @@ import org.bukkit.event.entity.ExplosionPrimeEvent;
|
|||||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||||
import org.bukkit.event.entity.PotionSplashEvent;
|
import org.bukkit.event.entity.PotionSplashEvent;
|
||||||
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.bukkit.inventory.meta.PotionMeta;
|
import org.bukkit.inventory.meta.PotionMeta;
|
||||||
import org.bukkit.metadata.FixedMetadataValue;
|
import org.bukkit.metadata.FixedMetadataValue;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
import org.bukkit.projectiles.ProjectileSource;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
@@ -42,6 +44,7 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
|||||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent;
|
import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent;
|
||||||
import com.gmail.nossr50.events.fake.FakeEntityDamageEvent;
|
import com.gmail.nossr50.events.fake.FakeEntityDamageEvent;
|
||||||
|
import com.gmail.nossr50.events.fake.FakeEntityTameEvent;
|
||||||
import com.gmail.nossr50.party.PartyManager;
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
|
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
|
||||||
import com.gmail.nossr50.skills.acrobatics.AcrobaticsManager;
|
import com.gmail.nossr50.skills.acrobatics.AcrobaticsManager;
|
||||||
@@ -51,6 +54,7 @@ import com.gmail.nossr50.skills.herbalism.Herbalism;
|
|||||||
import com.gmail.nossr50.skills.mining.MiningManager;
|
import com.gmail.nossr50.skills.mining.MiningManager;
|
||||||
import com.gmail.nossr50.skills.taming.Taming;
|
import com.gmail.nossr50.skills.taming.Taming;
|
||||||
import com.gmail.nossr50.skills.taming.TamingManager;
|
import com.gmail.nossr50.skills.taming.TamingManager;
|
||||||
|
import com.gmail.nossr50.util.BlockUtils;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
@@ -72,14 +76,12 @@ public class EntityListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack bow = event.getBow();
|
if (event.getBow().containsEnchantment(Enchantment.ARROW_INFINITE)) {
|
||||||
|
|
||||||
if (bow != null && bow.containsEnchantment(Enchantment.ARROW_INFINITE)) {
|
|
||||||
projectile.setMetadata(mcMMO.infiniteArrowKey, mcMMO.metadataValue);
|
projectile.setMetadata(mcMMO.infiniteArrowKey, mcMMO.metadataValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
projectile.setMetadata(mcMMO.bowForceKey, new FixedMetadataValue(plugin, Math.min(event.getForce() * AdvancedConfig.getInstance().getForceMultiplier(), 1.0)));
|
projectile.setMetadata(mcMMO.bowForceKey, new FixedMetadataValue(plugin, Math.min(event.getForce() * AdvancedConfig.getInstance().getForceMultiplier(), 1.0)));
|
||||||
projectile.setMetadata(mcMMO.arrowDistanceKey, new FixedMetadataValue(plugin, Archery.locationToString(projectile.getLocation())));
|
projectile.setMetadata(mcMMO.arrowDistanceKey, new FixedMetadataValue(plugin, projectile.getLocation()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
@@ -91,7 +93,7 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
projectile.setMetadata(mcMMO.bowForceKey, new FixedMetadataValue(plugin, 1.0));
|
projectile.setMetadata(mcMMO.bowForceKey, new FixedMetadataValue(plugin, 1.0));
|
||||||
projectile.setMetadata(mcMMO.arrowDistanceKey, new FixedMetadataValue(plugin, Archery.locationToString(projectile.getLocation())));
|
projectile.setMetadata(mcMMO.arrowDistanceKey, new FixedMetadataValue(plugin, projectile.getLocation()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -101,21 +103,29 @@ public class EntityListener implements Listener {
|
|||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onEntityChangeBlock(EntityChangeBlockEvent event) {
|
public void onEntityChangeBlock(EntityChangeBlockEvent event) {
|
||||||
Entity entity = event.getEntity();
|
Block block = event.getBlock();
|
||||||
|
|
||||||
if (!(entity instanceof FallingBlock)) {
|
if (!BlockUtils.shouldBeWatched(block.getState())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Block block = event.getBlock();
|
Entity entity = event.getEntity();
|
||||||
boolean isTracked = entity.hasMetadata(mcMMO.entityMetadataKey);
|
|
||||||
|
|
||||||
if (mcMMO.getPlaceStore().isTrue(block) && !isTracked) {
|
if (entity instanceof FallingBlock || entity instanceof Enderman) {
|
||||||
mcMMO.getPlaceStore().setFalse(block);
|
boolean isTracked = entity.hasMetadata(mcMMO.entityMetadataKey);
|
||||||
entity.setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
|
|
||||||
|
if (mcMMO.getPlaceStore().isTrue(block) && !isTracked) {
|
||||||
|
mcMMO.getPlaceStore().setFalse(block);
|
||||||
|
entity.setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
|
||||||
|
}
|
||||||
|
else if (isTracked) {
|
||||||
|
mcMMO.getPlaceStore().setTrue(block);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (isTracked) {
|
else {
|
||||||
mcMMO.getPlaceStore().setTrue(block);
|
if (mcMMO.getPlaceStore().isTrue(block)) {
|
||||||
|
mcMMO.getPlaceStore().setFalse(block);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,7 +170,11 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (attacker instanceof Projectile) {
|
if (attacker instanceof Projectile) {
|
||||||
attacker = ((Projectile) attacker).getShooter();
|
ProjectileSource projectileSource = ((Projectile) attacker).getShooter();
|
||||||
|
|
||||||
|
if (projectileSource instanceof LivingEntity) {
|
||||||
|
attacker = (LivingEntity) projectileSource;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (attacker instanceof Tameable) {
|
else if (attacker instanceof Tameable) {
|
||||||
AnimalTamer animalTamer = ((Tameable) attacker).getOwner();
|
AnimalTamer animalTamer = ((Tameable) attacker).getOwner();
|
||||||
@@ -174,6 +188,10 @@ public class EntityListener implements Listener {
|
|||||||
Player defendingPlayer = (Player) defender;
|
Player defendingPlayer = (Player) defender;
|
||||||
Player attackingPlayer = (Player) attacker;
|
Player attackingPlayer = (Player) attacker;
|
||||||
|
|
||||||
|
if (!UserManager.hasPlayerDataKey(defendingPlayer) || !UserManager.hasPlayerDataKey(attackingPlayer)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// We want to make sure we're not gaining XP or applying abilities when we hit ourselves
|
// We want to make sure we're not gaining XP or applying abilities when we hit ourselves
|
||||||
if (defendingPlayer.equals(attackingPlayer)) {
|
if (defendingPlayer.equals(attackingPlayer)) {
|
||||||
return;
|
return;
|
||||||
@@ -186,6 +204,7 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CombatUtils.processCombatAttack(event, attacker, target);
|
CombatUtils.processCombatAttack(event, attacker, target);
|
||||||
|
CombatUtils.handleHealthbars(attacker, target, event.getDamage());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -226,6 +245,11 @@ public class EntityListener implements Listener {
|
|||||||
|
|
||||||
if (livingEntity instanceof Player) {
|
if (livingEntity instanceof Player) {
|
||||||
Player player = (Player) entity;
|
Player player = (Player) entity;
|
||||||
|
|
||||||
|
if (!UserManager.hasPlayerDataKey(player)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
/* Check for invincibility */
|
/* Check for invincibility */
|
||||||
@@ -236,7 +260,7 @@ public class EntityListener implements Listener {
|
|||||||
|
|
||||||
switch (cause) {
|
switch (cause) {
|
||||||
case FALL:
|
case FALL:
|
||||||
if (Config.getInstance().getPreventXPAfterTeleport() && SkillUtils.calculateTimeLeft((long) mcMMOPlayer.getTeleportATS() * Misc.TIME_CONVERSION_FACTOR, 5, player) > 0) {
|
if (!SkillUtils.cooldownExpired((long) mcMMOPlayer.getTeleportATS(), Config.getInstance().getXPAfterTeleportCooldown())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -557,6 +581,10 @@ public class EntityListener implements Listener {
|
|||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onEntityTame(EntityTameEvent event) {
|
public void onEntityTame(EntityTameEvent event) {
|
||||||
|
if (event instanceof FakeEntityTameEvent) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Player player = (Player) event.getOwner();
|
Player player = (Player) event.getOwner();
|
||||||
LivingEntity entity = event.getEntity();
|
LivingEntity entity = event.getEntity();
|
||||||
|
|
||||||
@@ -603,9 +631,8 @@ public class EntityListener implements Listener {
|
|||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onPotionSplash(PotionSplashEvent event) {
|
public void onPotionSplash(PotionSplashEvent event) {
|
||||||
for (PotionEffect effect : ((PotionMeta) event.getEntity().getItem().getItemMeta()).getCustomEffects()) {
|
for (PotionEffect effect : ((PotionMeta) event.getPotion().getItem().getItemMeta()).getCustomEffects()) {
|
||||||
// (effect.getType() != PotionEffectType.SATURATION) is seemingly broken, so we use deprecated method for now.
|
if (!effect.getType().equals(PotionEffectType.SATURATION)) {
|
||||||
if (effect.getType().getId() != 23) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -183,7 +183,10 @@ public class InventoryListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AlchemyPotionBrewer.transferItems(event.getView(), event.getRawSlot(), Alchemy.INGREDIENT_SLOT, click);
|
if (!AlchemyPotionBrewer.transferItems(event.getView(), event.getRawSlot(), click)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
AlchemyPotionBrewer.scheduleUpdate(inventory);
|
AlchemyPotionBrewer.scheduleUpdate(inventory);
|
||||||
AlchemyPotionBrewer.scheduleCheck(player, stand);
|
AlchemyPotionBrewer.scheduleCheck(player, stand);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import org.bukkit.Sound;
|
|||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Item;
|
import org.bukkit.entity.Item;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -23,6 +24,7 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
|||||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||||
|
import org.bukkit.event.player.PlayerStatisticIncrementEvent;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
@@ -81,7 +83,7 @@ public class PlayerListener implements Listener {
|
|||||||
public void onPlayerTeleport(PlayerTeleportEvent event) {
|
public void onPlayerTeleport(PlayerTeleportEvent event) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
if (!UserManager.hasPlayerDataKey(player) || !Config.getInstance().getPreventXPAfterTeleport() || event.getFrom().equals(event.getTo())) {
|
if (!UserManager.hasPlayerDataKey(player) || Config.getInstance().getXPAfterTeleportCooldown() <= 0 || event.getFrom().equals(event.getTo())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,6 +224,13 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case CAUGHT_FISH:
|
case CAUGHT_FISH:
|
||||||
|
//TODO Update to new API once available! Waiting for case CAUGHT_TREASURE:
|
||||||
|
Item fishingCatch = (Item) event.getCaught();
|
||||||
|
|
||||||
|
if (Config.getInstance().getFishingOverrideTreasures() && fishingCatch.getItemStack().getType() != Material.RAW_FISH) {
|
||||||
|
fishingCatch.setItemStack(new ItemStack(Material.RAW_FISH, 1));
|
||||||
|
}
|
||||||
|
|
||||||
if (Permissions.vanillaXpBoost(player, SkillType.FISHING)) {
|
if (Permissions.vanillaXpBoost(player, SkillType.FISHING)) {
|
||||||
event.setExpToDrop(fishingManager.handleVanillaXpBoost(event.getExpToDrop()));
|
event.setExpToDrop(fishingManager.handleVanillaXpBoost(event.getExpToDrop()));
|
||||||
}
|
}
|
||||||
@@ -304,7 +313,7 @@ public class PlayerListener implements Listener {
|
|||||||
ItemStack dropStack = drop.getItemStack();
|
ItemStack dropStack = drop.getItemStack();
|
||||||
|
|
||||||
if (drop.hasMetadata(mcMMO.disarmedItemKey)) {
|
if (drop.hasMetadata(mcMMO.disarmedItemKey)) {
|
||||||
if (!player.getName().equals(drop.getMetadata(mcMMO.disarmedItemKey).get(0).value())) {
|
if (!player.getName().equals(drop.getMetadata(mcMMO.disarmedItemKey).get(0).asString())) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -596,21 +605,14 @@ public class PlayerListener implements Listener {
|
|||||||
Material type = heldItem.getType();
|
Material type = heldItem.getType();
|
||||||
TamingManager tamingManager = mcMMOPlayer.getTamingManager();
|
TamingManager tamingManager = mcMMOPlayer.getTamingManager();
|
||||||
|
|
||||||
switch (type) {
|
if (type == Config.getInstance().getTamingCOTWMaterial(EntityType.WOLF)) {
|
||||||
case APPLE:
|
tamingManager.summonWolf();
|
||||||
tamingManager.summonHorse();
|
}
|
||||||
break;
|
else if (type == Config.getInstance().getTamingCOTWMaterial(EntityType.OCELOT)) {
|
||||||
|
tamingManager.summonOcelot();
|
||||||
case BONE:
|
}
|
||||||
tamingManager.summonWolf();
|
else if (type == Config.getInstance().getTamingCOTWMaterial(EntityType.HORSE)) {
|
||||||
break;
|
tamingManager.summonHorse();
|
||||||
|
|
||||||
case RAW_FISH:
|
|
||||||
tamingManager.summonOcelot();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -633,7 +635,7 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player, true);
|
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(player);
|
||||||
|
|
||||||
if (mcMMOPlayer == null) {
|
if (mcMMOPlayer == null) {
|
||||||
mcMMO.p.debug(player.getName() + "is chatting, but is currently not logged in to the server.");
|
mcMMO.p.debug(player.getName() + "is chatting, but is currently not logged in to the server.");
|
||||||
@@ -693,4 +695,13 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
|
public void onPlayerStatisticIncrementEvent(PlayerStatisticIncrementEvent event) {
|
||||||
|
if (!mcMMO.getHolidayManager().isAprilFirst()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMO.getHolidayManager().handleStatisticEvent(event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
package com.gmail.nossr50.listeners;
|
package com.gmail.nossr50.listeners;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
|
||||||
import com.gmail.nossr50.events.experience.McMMOPlayerXpGainEvent;
|
|
||||||
import com.gmail.nossr50.events.skills.abilities.McMMOPlayerAbilityActivateEvent;
|
|
||||||
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
|
||||||
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;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
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.skills.abilities.McMMOPlayerAbilityActivateEvent;
|
||||||
|
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
||||||
|
|
||||||
public class SelfListener implements Listener {
|
public class SelfListener implements Listener {
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.gmail.nossr50.listeners;
|
package com.gmail.nossr50.listeners;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@@ -18,7 +17,6 @@ import com.gmail.nossr50.mcMMO;
|
|||||||
import com.gmail.nossr50.util.blockmeta.conversion.BlockStoreConversionMain;
|
import com.gmail.nossr50.util.blockmeta.conversion.BlockStoreConversionMain;
|
||||||
|
|
||||||
public class WorldListener implements Listener {
|
public class WorldListener implements Listener {
|
||||||
private final ArrayList<BlockStoreConversionMain> converters = new ArrayList<BlockStoreConversionMain>();
|
|
||||||
private final mcMMO plugin;
|
private final mcMMO plugin;
|
||||||
|
|
||||||
public WorldListener(final mcMMO plugin) {
|
public WorldListener(final mcMMO plugin) {
|
||||||
@@ -56,9 +54,7 @@ public class WorldListener implements Listener {
|
|||||||
|
|
||||||
plugin.getLogger().info("Converting block storage for " + world.getName() + " to a new format.");
|
plugin.getLogger().info("Converting block storage for " + world.getName() + " to a new format.");
|
||||||
|
|
||||||
BlockStoreConversionMain converter = new BlockStoreConversionMain(world);
|
new BlockStoreConversionMain(world).run();
|
||||||
converter.run();
|
|
||||||
converters.add(converter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,11 +5,6 @@ import java.io.IOException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.mods.ArmorConfigManager;
|
|
||||||
import com.gmail.nossr50.config.mods.BlockConfigManager;
|
|
||||||
import com.gmail.nossr50.config.mods.EntityConfigManager;
|
|
||||||
import com.gmail.nossr50.config.mods.ToolConfigManager;
|
|
||||||
import com.gmail.nossr50.util.ModManager;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
import org.bukkit.metadata.FixedMetadataValue;
|
import org.bukkit.metadata.FixedMetadataValue;
|
||||||
@@ -19,6 +14,10 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.HiddenConfig;
|
import com.gmail.nossr50.config.HiddenConfig;
|
||||||
|
import com.gmail.nossr50.config.mods.ArmorConfigManager;
|
||||||
|
import com.gmail.nossr50.config.mods.BlockConfigManager;
|
||||||
|
import com.gmail.nossr50.config.mods.EntityConfigManager;
|
||||||
|
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.treasure.TreasureConfig;
|
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||||
@@ -33,6 +32,7 @@ import com.gmail.nossr50.listeners.WorldListener;
|
|||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.metrics.MetricsManager;
|
import com.gmail.nossr50.metrics.MetricsManager;
|
||||||
import com.gmail.nossr50.party.PartyManager;
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.runnables.CheckDateTask;
|
||||||
import com.gmail.nossr50.runnables.SaveTimerTask;
|
import com.gmail.nossr50.runnables.SaveTimerTask;
|
||||||
import com.gmail.nossr50.runnables.backups.CleanBackupsTask;
|
import com.gmail.nossr50.runnables.backups.CleanBackupsTask;
|
||||||
import com.gmail.nossr50.runnables.database.UserPurgeTask;
|
import com.gmail.nossr50.runnables.database.UserPurgeTask;
|
||||||
@@ -48,6 +48,7 @@ import com.gmail.nossr50.util.ChimaeraWing;
|
|||||||
import com.gmail.nossr50.util.HolidayManager;
|
import com.gmail.nossr50.util.HolidayManager;
|
||||||
import com.gmail.nossr50.util.LogFilter;
|
import com.gmail.nossr50.util.LogFilter;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.ModManager;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManager;
|
import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManager;
|
||||||
import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManagerFactory;
|
import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManagerFactory;
|
||||||
@@ -87,9 +88,6 @@ public class mcMMO extends JavaPlugin {
|
|||||||
/* Plugin Checks */
|
/* Plugin Checks */
|
||||||
private static boolean combatTagEnabled;
|
private static boolean combatTagEnabled;
|
||||||
private static boolean healthBarPluginEnabled;
|
private static boolean healthBarPluginEnabled;
|
||||||
private static boolean noCheatPlusPluginEnabled;
|
|
||||||
private static boolean compatNoCheatPlusPluginEnabled;
|
|
||||||
private static boolean mcpcEnabled;
|
|
||||||
|
|
||||||
// Config Validation Check
|
// Config Validation Check
|
||||||
public boolean noErrorsInConfigFiles = true;
|
public boolean noErrorsInConfigFiles = true;
|
||||||
@@ -125,11 +123,9 @@ public class mcMMO extends JavaPlugin {
|
|||||||
getLogger().setFilter(new LogFilter(this));
|
getLogger().setFilter(new LogFilter(this));
|
||||||
metadataValue = new FixedMetadataValue(this, true);
|
metadataValue = new FixedMetadataValue(this, true);
|
||||||
|
|
||||||
mcpcEnabled = getServer().getName().equals("MCPC+");
|
PluginManager pluginManager = getServer().getPluginManager();
|
||||||
combatTagEnabled = getServer().getPluginManager().getPlugin("CombatTag") != null;
|
combatTagEnabled = pluginManager.getPlugin("CombatTag") != null;
|
||||||
healthBarPluginEnabled = getServer().getPluginManager().getPlugin("HealthBar") != null;
|
healthBarPluginEnabled = pluginManager.getPlugin("HealthBar") != null;
|
||||||
noCheatPlusPluginEnabled = getServer().getPluginManager().getPlugin("NoCheatPlus") != null;
|
|
||||||
compatNoCheatPlusPluginEnabled = getServer().getPluginManager().getPlugin("CompatNoCheatPlus") != null;
|
|
||||||
|
|
||||||
setupFilePaths();
|
setupFilePaths();
|
||||||
|
|
||||||
@@ -141,7 +137,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mcpcEnabled) {
|
if (getServer().getName().equals("MCPC+")) {
|
||||||
checkModConfigs();
|
checkModConfigs();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,7 +145,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
getLogger().info("HealthBar plugin found, mcMMO's healthbars are automatically disabled.");
|
getLogger().info("HealthBar plugin found, mcMMO's healthbars are automatically disabled.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (noCheatPlusPluginEnabled && !compatNoCheatPlusPluginEnabled) {
|
if (pluginManager.getPlugin("NoCheatPlus") != null && pluginManager.getPlugin("CompatNoCheatPlus") == null) {
|
||||||
getLogger().warning("NoCheatPlus plugin found, but CompatNoCheatPlus was not found!");
|
getLogger().warning("NoCheatPlus plugin found, but CompatNoCheatPlus was not found!");
|
||||||
getLogger().warning("mcMMO will not work properly alongside NoCheatPlus without CompatNoCheatPlus");
|
getLogger().warning("mcMMO will not work properly alongside NoCheatPlus without CompatNoCheatPlus");
|
||||||
}
|
}
|
||||||
@@ -315,10 +311,6 @@ public class mcMMO extends JavaPlugin {
|
|||||||
return healthBarPluginEnabled;
|
return healthBarPluginEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isMCPCEnabled() {
|
|
||||||
return mcpcEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup the various storage file paths
|
* Setup the various storage file paths
|
||||||
*/
|
*/
|
||||||
@@ -486,6 +478,10 @@ public class mcMMO extends JavaPlugin {
|
|||||||
|
|
||||||
// Update power level tag scoreboards
|
// Update power level tag scoreboards
|
||||||
new PowerLevelUpdatingTask().runTaskTimer(this, 2 * Misc.TICK_CONVERSION_FACTOR, 2 * Misc.TICK_CONVERSION_FACTOR);
|
new PowerLevelUpdatingTask().runTaskTimer(this, 2 * Misc.TICK_CONVERSION_FACTOR, 2 * Misc.TICK_CONVERSION_FACTOR);
|
||||||
|
|
||||||
|
if (getHolidayManager().nearingAprilFirst()) {
|
||||||
|
new CheckDateTask().runTaskTimer(this, 10L * Misc.TICK_CONVERSION_FACTOR, 1L * 60L * 60L * Misc.TICK_CONVERSION_FACTOR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkModConfigs() {
|
private void checkModConfigs() {
|
||||||
|
|||||||
@@ -260,6 +260,11 @@ public final class PartyManager {
|
|||||||
processPartyLeaving(UserManager.getPlayer(member));
|
processPartyLeaving(UserManager.getPlayer(member));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disband the alliance between the disbanded party and it's ally
|
||||||
|
if (party.getAlly() != null) {
|
||||||
|
party.getAlly().setAlly(null);
|
||||||
|
}
|
||||||
|
|
||||||
parties.remove(party);
|
parties.remove(party);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -459,16 +464,6 @@ public final class PartyManager {
|
|||||||
return !party.isLocked() || party.getLeader().equalsIgnoreCase(mcMMOPlayer.getPlayer().getName());
|
return !party.isLocked() || party.getLeader().equalsIgnoreCase(mcMMOPlayer.getPlayer().getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a string is a valid party name.
|
|
||||||
*
|
|
||||||
* @param partyName The party name to check
|
|
||||||
* @return true if this is a valid party, false otherwise
|
|
||||||
*/
|
|
||||||
public static boolean isParty(String partyName) {
|
|
||||||
return getParty(partyName) != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load party file.
|
* Load party file.
|
||||||
*/
|
*/
|
||||||
|
|||||||
24
src/main/java/com/gmail/nossr50/runnables/CheckDateTask.java
Normal file
24
src/main/java/com/gmail/nossr50/runnables/CheckDateTask.java
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package com.gmail.nossr50.runnables;
|
||||||
|
|
||||||
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.runnables.skills.AprilTask;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
|
||||||
|
public class CheckDateTask extends BukkitRunnable {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (!mcMMO.getHolidayManager().isAprilFirst()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set up jokes
|
||||||
|
new AprilTask().runTaskTimer(mcMMO.p, 1L * 60L * Misc.TICK_CONVERSION_FACTOR, 10L * 60L * Misc.TICK_CONVERSION_FACTOR);
|
||||||
|
mcMMO.getHolidayManager().registerAprilCommand();
|
||||||
|
|
||||||
|
// Jokes deployed.
|
||||||
|
this.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,31 +1,31 @@
|
|||||||
package com.gmail.nossr50.runnables;
|
package com.gmail.nossr50.runnables;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
|
import org.bukkit.block.PistonMoveReaction;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.util.BlockUtils;
|
||||||
|
|
||||||
public class StickyPistonTrackerTask extends BukkitRunnable {
|
public class StickyPistonTrackerTask extends BukkitRunnable {
|
||||||
private BlockFace direction;
|
private BlockFace direction;
|
||||||
private Block block;
|
private Block block;
|
||||||
|
private Block movedBlock;
|
||||||
|
|
||||||
public StickyPistonTrackerTask(BlockFace direction, Block block) {
|
public StickyPistonTrackerTask(BlockFace direction, Block block, Block movedBlock) {
|
||||||
this.direction = direction;
|
this.direction = direction;
|
||||||
this.block = block;
|
this.block = block;
|
||||||
|
this.movedBlock = movedBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Block newBlock = block.getRelative(direction);
|
if (!BlockUtils.shouldBeWatched(movedBlock.getState()) || movedBlock.getPistonMoveReaction() != PistonMoveReaction.MOVE || !mcMMO.getPlaceStore().isTrue(movedBlock)) {
|
||||||
Block originalBlock = newBlock.getRelative(direction);
|
|
||||||
|
|
||||||
if (originalBlock.getType() != Material.AIR || !mcMMO.getPlaceStore().isTrue(originalBlock)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mcMMO.getPlaceStore().setFalse(originalBlock);
|
mcMMO.getPlaceStore().setFalse(movedBlock);
|
||||||
mcMMO.getPlaceStore().setTrue(newBlock);
|
mcMMO.getPlaceStore().setTrue(block.getRelative(direction));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class FormulaConversionTask extends BukkitRunnable {
|
|||||||
int convertedUsers = 0;
|
int convertedUsers = 0;
|
||||||
long startMillis = System.currentTimeMillis();
|
long startMillis = System.currentTimeMillis();
|
||||||
for (String playerName : mcMMO.getDatabaseManager().getStoredUsers()) {
|
for (String playerName : mcMMO.getDatabaseManager().getStoredUsers()) {
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||||
PlayerProfile profile;
|
PlayerProfile profile;
|
||||||
|
|
||||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.gmail.nossr50.runnables.skills;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Sound;
|
||||||
|
import org.bukkit.Statistic;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.util.HolidayManager;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
|
||||||
|
public class AprilTask extends BukkitRunnable {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (!mcMMO.getHolidayManager().isAprilFirst()) {
|
||||||
|
this.cancel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
||||||
|
int random = Misc.getRandom().nextInt(40) + 11;
|
||||||
|
int betterRandom = Misc.getRandom().nextInt(2000);
|
||||||
|
if (betterRandom == 0) {
|
||||||
|
player.playSound(player.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH);
|
||||||
|
player.sendMessage(unknown("superskill") + " skill increased by 1. Total (" + unknown("12") + ")");
|
||||||
|
fireworksShow(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Statistic statistic : mcMMO.getHolidayManager().movementStatistics) {
|
||||||
|
if (player.getStatistic(statistic) > 0 && player.getStatistic(statistic) % random == 0) {
|
||||||
|
mcMMO.getHolidayManager().levelUpApril(player, HolidayManager.FakeSkillType.getByStatistic(statistic));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fireworksShow(final Player player) {
|
||||||
|
final int firework_amount = 10;
|
||||||
|
for (int i = 0; i < firework_amount; i++) {
|
||||||
|
int delay = (int) (Misc.getRandom().nextDouble() * 3 * Misc.TICK_CONVERSION_FACTOR) + 4;
|
||||||
|
mcMMO.p.getServer().getScheduler().runTaskLater(mcMMO.p, new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mcMMO.getHolidayManager().spawnFireworks(player);
|
||||||
|
}
|
||||||
|
}, delay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String unknown(String string) {
|
||||||
|
return ChatColor.MAGIC + string + ChatColor.RESET + ChatColor.YELLOW;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,10 +17,6 @@ public abstract class SkillManager {
|
|||||||
this.skill = skill;
|
this.skill = skill;
|
||||||
}
|
}
|
||||||
|
|
||||||
public McMMOPlayer getMcMMOPlayer() {
|
|
||||||
return mcMMOPlayer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Player getPlayer() {
|
public Player getPlayer() {
|
||||||
return mcMMOPlayer.getPlayer();
|
return mcMMOPlayer.getPlayer();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.skills.alchemy;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.skills.alchemy.PotionConfig;
|
import com.gmail.nossr50.config.skills.alchemy.PotionConfig;
|
||||||
import com.gmail.nossr50.datatypes.skills.alchemy.AlchemyPotion;
|
|
||||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.alchemy.AlchemyPotion;
|
||||||
import com.gmail.nossr50.runnables.PlayerUpdateInventoryTask;
|
import com.gmail.nossr50.runnables.PlayerUpdateInventoryTask;
|
||||||
import com.gmail.nossr50.runnables.skills.AlchemyBrewCheckTask;
|
import com.gmail.nossr50.runnables.skills.AlchemyBrewCheckTask;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
@@ -54,7 +54,7 @@ public final class AlchemyPotionBrewer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean removeIngredient(BrewerInventory inventory, Player player) {
|
private static boolean removeIngredient(BrewerInventory inventory, Player player) {
|
||||||
ItemStack ingredient = inventory.getIngredient().clone();
|
ItemStack ingredient = inventory.getIngredient() == null ? null : inventory.getIngredient().clone();
|
||||||
|
|
||||||
if (isEmpty(ingredient) || !isValidIngredient(player, ingredient)) {
|
if (isEmpty(ingredient) || !isValidIngredient(player, ingredient)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -124,25 +124,24 @@ public final class AlchemyPotionBrewer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean transferItems(InventoryView view, int fromSlot, int toSlot, ClickType click) {
|
public static boolean transferItems(InventoryView view, int fromSlot, ClickType click) {
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
|
|
||||||
if (click.isLeftClick()) {
|
if (click.isLeftClick()) {
|
||||||
success = transferItems(view, fromSlot, toSlot);
|
success = transferItems(view, fromSlot);
|
||||||
}
|
}
|
||||||
else if (click.isRightClick()) {
|
else if (click.isRightClick()) {
|
||||||
success = transferOneItem(view, fromSlot, toSlot);
|
success = transferOneItem(view, fromSlot);
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean transferOneItem(InventoryView view, int fromSlot, int toSlot) {
|
private static boolean transferOneItem(InventoryView view, int fromSlot) {
|
||||||
ItemStack from = view.getItem(fromSlot).clone();
|
ItemStack from = view.getItem(fromSlot).clone();
|
||||||
ItemStack to = view.getItem(toSlot).clone();
|
ItemStack to = view.getItem(Alchemy.INGREDIENT_SLOT).clone();
|
||||||
boolean emptyFrom = isEmpty(from);
|
|
||||||
|
|
||||||
if (emptyFrom) {
|
if (isEmpty(from)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,8 +161,8 @@ public final class AlchemyPotionBrewer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
from.setAmount(fromAmount - 1);
|
from.setAmount(fromAmount - 1);
|
||||||
view.setItem(toSlot, emptyTo ? null : to);
|
view.setItem(Alchemy.INGREDIENT_SLOT, to);
|
||||||
view.setItem(fromSlot, emptyFrom ? null : from);
|
view.setItem(fromSlot, from);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -174,15 +173,15 @@ public final class AlchemyPotionBrewer {
|
|||||||
/**
|
/**
|
||||||
* Transfer items between two ItemStacks, returning the leftover status
|
* Transfer items between two ItemStacks, returning the leftover status
|
||||||
*/
|
*/
|
||||||
private static boolean transferItems(InventoryView view, int fromSlot, int toSlot) {
|
private static boolean transferItems(InventoryView view, int fromSlot) {
|
||||||
ItemStack from = view.getItem(fromSlot).clone();
|
ItemStack from = view.getItem(fromSlot).clone();
|
||||||
ItemStack to = view.getItem(toSlot).clone();
|
ItemStack to = view.getItem(Alchemy.INGREDIENT_SLOT).clone();
|
||||||
|
|
||||||
if (isEmpty(from)) {
|
if (isEmpty(from)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (isEmpty(to)) {
|
else if (isEmpty(to)) {
|
||||||
view.setItem(toSlot, from);
|
view.setItem(Alchemy.INGREDIENT_SLOT, from);
|
||||||
view.setItem(fromSlot, null);
|
view.setItem(fromSlot, null);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -196,7 +195,7 @@ public final class AlchemyPotionBrewer {
|
|||||||
int left = fromAmount + toAmount - maxSize;
|
int left = fromAmount + toAmount - maxSize;
|
||||||
|
|
||||||
to.setAmount(maxSize);
|
to.setAmount(maxSize);
|
||||||
view.setItem(toSlot, to);
|
view.setItem(Alchemy.INGREDIENT_SLOT, to);
|
||||||
|
|
||||||
from.setAmount(left);
|
from.setAmount(left);
|
||||||
view.setItem(fromSlot, from);
|
view.setItem(fromSlot, from);
|
||||||
@@ -206,7 +205,7 @@ public final class AlchemyPotionBrewer {
|
|||||||
|
|
||||||
to.setAmount(fromAmount + toAmount);
|
to.setAmount(fromAmount + toAmount);
|
||||||
view.setItem(fromSlot, null);
|
view.setItem(fromSlot, null);
|
||||||
view.setItem(toSlot, to);
|
view.setItem(Alchemy.INGREDIENT_SLOT, to);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,10 @@ import java.util.ArrayList;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
|
||||||
@@ -63,14 +61,4 @@ public class Archery {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Location stringToLocation(String location) {
|
|
||||||
String[] values = location.split(",");
|
|
||||||
|
|
||||||
return new Location(mcMMO.p.getServer().getWorld(values[0]), Double.parseDouble(values[1]), Double.parseDouble(values[2]), Double.parseDouble(values[3]), Float.parseFloat(values[4]), Float.parseFloat(values[5]));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String locationToString(Location location) {
|
|
||||||
return location.getWorld().getName() + "," + location.getX() + "," + location.getY() + "," + location.getZ() + "," + location.getYaw() + "," + location.getPitch();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class ArcheryManager extends SkillManager {
|
|||||||
* @param damager The {@link Entity} who shot the arrow
|
* @param damager The {@link Entity} who shot the arrow
|
||||||
*/
|
*/
|
||||||
public void distanceXpBonus(LivingEntity target, Entity damager) {
|
public void distanceXpBonus(LivingEntity target, Entity damager) {
|
||||||
Location firedLocation = Archery.stringToLocation(damager.getMetadata(mcMMO.arrowDistanceKey).get(0).asString());
|
Location firedLocation = (Location) damager.getMetadata(mcMMO.arrowDistanceKey).get(0).value();
|
||||||
Location targetLocation = target.getLocation();
|
Location targetLocation = target.getLocation();
|
||||||
|
|
||||||
if (firedLocation.getWorld() != targetLocation.getWorld()) {
|
if (firedLocation.getWorld() != targetLocation.getWorld()) {
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package com.gmail.nossr50.skills.excavation;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
@@ -21,13 +21,13 @@ public class Excavation {
|
|||||||
protected static List<ExcavationTreasure> getTreasures(BlockState blockState) {
|
protected static List<ExcavationTreasure> getTreasures(BlockState blockState) {
|
||||||
switch (blockState.getType()) {
|
switch (blockState.getType()) {
|
||||||
case DIRT:
|
case DIRT:
|
||||||
return TreasureConfig.getInstance().excavationFromDirt;
|
return blockState.getRawData() == 0x2 ? TreasureConfig.getInstance().excavationFromPodzol : TreasureConfig.getInstance().excavationFromDirt;
|
||||||
|
|
||||||
case GRASS:
|
case GRASS:
|
||||||
return TreasureConfig.getInstance().excavationFromGrass;
|
return TreasureConfig.getInstance().excavationFromGrass;
|
||||||
|
|
||||||
case SAND:
|
case SAND:
|
||||||
return TreasureConfig.getInstance().excavationFromSand;
|
return blockState.getRawData() == 0x1 ? TreasureConfig.getInstance().excavationFromRedSand : TreasureConfig.getInstance().excavationFromSand;
|
||||||
|
|
||||||
case GRAVEL:
|
case GRAVEL:
|
||||||
return TreasureConfig.getInstance().excavationFromGravel;
|
return TreasureConfig.getInstance().excavationFromGravel;
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.gmail.nossr50.skills.fishing;
|
package com.gmail.nossr50.skills.fishing;
|
||||||
|
|
||||||
|
import java.util.EnumSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.block.Biome;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@@ -54,7 +57,12 @@ public final class Fishing {
|
|||||||
public static int fishermansDietRankLevel2 = fishermansDietRankLevel1 * 2;
|
public static int fishermansDietRankLevel2 = fishermansDietRankLevel1 * 2;
|
||||||
public static int fishermansDietMaxLevel = fishermansDietRankLevel1 * 5;
|
public static int fishermansDietMaxLevel = fishermansDietRankLevel1 * 5;
|
||||||
|
|
||||||
public static final double STORM_MODIFIER = 0.909;
|
public static Set<Biome> masterAnglerBiomes = EnumSet.of(Biome.RIVER, Biome.OCEAN, Biome.DEEP_OCEAN);
|
||||||
|
public static Set<Biome> iceFishingBiomes = EnumSet.of(
|
||||||
|
Biome.FROZEN_OCEAN, Biome.FROZEN_RIVER,
|
||||||
|
Biome.TAIGA, Biome.TAIGA_HILLS, Biome.TAIGA_MOUNTAINS,
|
||||||
|
Biome.ICE_PLAINS, Biome.ICE_MOUNTAINS, Biome.ICE_PLAINS_SPIKES,
|
||||||
|
Biome.COLD_TAIGA, Biome.COLD_TAIGA_HILLS, Biome.COLD_TAIGA_MOUNTAINS);
|
||||||
|
|
||||||
private Fishing() {}
|
private Fishing() {}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.WeatherType;
|
import org.bukkit.WeatherType;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Biome;
|
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
@@ -70,7 +69,6 @@ public class FishingManager extends SkillManager {
|
|||||||
private Location fishingTarget;
|
private Location fishingTarget;
|
||||||
private Item fishingCatch;
|
private Item fishingCatch;
|
||||||
private Location hookLocation;
|
private Location hookLocation;
|
||||||
|
|
||||||
public FishingManager(McMMOPlayer mcMMOPlayer) {
|
public FishingManager(McMMOPlayer mcMMOPlayer) {
|
||||||
super(mcMMOPlayer, SkillType.FISHING);
|
super(mcMMOPlayer, SkillType.FISHING);
|
||||||
}
|
}
|
||||||
@@ -198,10 +196,7 @@ public class FishingManager extends SkillManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make sure this is a body of water, not just a block of ice.
|
// Make sure this is a body of water, not just a block of ice.
|
||||||
Biome biome = block.getBiome();
|
if (!Fishing.iceFishingBiomes.contains(block.getBiome()) && (block.getRelative(BlockFace.DOWN, 3).getType() != Material.STATIONARY_WATER)) {
|
||||||
boolean isFrozenBiome = (biome == Biome.FROZEN_OCEAN || biome == Biome.FROZEN_RIVER || biome == Biome.TAIGA || biome == Biome.TAIGA_HILLS || biome == Biome.ICE_PLAINS || biome == Biome.ICE_MOUNTAINS);
|
|
||||||
|
|
||||||
if (!isFrozenBiome && (block.getRelative(BlockFace.DOWN, 3).getType() != Material.STATIONARY_WATER)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,12 +276,11 @@ public class FishingManager extends SkillManager {
|
|||||||
public void masterAngler(Fish hook) {
|
public void masterAngler(Fish hook) {
|
||||||
Player player = getPlayer();
|
Player player = getPlayer();
|
||||||
Location location = hook.getLocation();
|
Location location = hook.getLocation();
|
||||||
Biome biome = location.getBlock().getBiome();
|
|
||||||
double biteChance = hook.getBiteChance();
|
double biteChance = hook.getBiteChance();
|
||||||
|
|
||||||
hookLocation = location;
|
hookLocation = location;
|
||||||
|
|
||||||
if (biome == Biome.RIVER || biome == Biome.OCEAN) {
|
if (Fishing.masterAnglerBiomes.contains(location.getBlock().getBiome())) {
|
||||||
biteChance = biteChance * AdvancedConfig.getInstance().getMasterAnglerBiomeModifier();
|
biteChance = biteChance * AdvancedConfig.getInstance().getMasterAnglerBiomeModifier();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -304,6 +298,7 @@ public class FishingManager extends SkillManager {
|
|||||||
*/
|
*/
|
||||||
public void handleFishing(Item fishingCatch) {
|
public void handleFishing(Item fishingCatch) {
|
||||||
this.fishingCatch = fishingCatch;
|
this.fishingCatch = fishingCatch;
|
||||||
|
int fishXp = ExperienceConfig.getInstance().getFishXp(fishingCatch.getItemStack().getData());
|
||||||
int treasureXp = 0;
|
int treasureXp = 0;
|
||||||
Player player = getPlayer();
|
Player player = getPlayer();
|
||||||
FishingTreasure treasure = null;
|
FishingTreasure treasure = null;
|
||||||
@@ -314,8 +309,6 @@ public class FishingManager extends SkillManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (treasure != null) {
|
if (treasure != null) {
|
||||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.TH.ItemFound"));
|
|
||||||
|
|
||||||
ItemStack treasureDrop = treasure.getDrop().clone(); // Not cloning is bad, m'kay?
|
ItemStack treasureDrop = treasure.getDrop().clone(); // Not cloning is bad, m'kay?
|
||||||
Map<Enchantment, Integer> enchants = new HashMap<Enchantment, Integer>();
|
Map<Enchantment, Integer> enchants = new HashMap<Enchantment, Integer>();
|
||||||
|
|
||||||
@@ -347,11 +340,15 @@ public class FishingManager extends SkillManager {
|
|||||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.TH.MagicFound"));
|
player.sendMessage(LocaleLoader.getString("Fishing.Ability.TH.MagicFound"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.getInstance().getFishingExtraFish()) {
|
||||||
|
Misc.dropItem(player.getEyeLocation(), fishingCatch.getItemStack());
|
||||||
|
}
|
||||||
|
|
||||||
fishingCatch.setItemStack(treasureDrop);
|
fishingCatch.setItemStack(treasureDrop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
applyXpGain(ExperienceConfig.getInstance().getFishingBaseXP() + treasureXp);
|
applyXpGain(fishXp + treasureXp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -450,6 +447,8 @@ public class FishingManager extends SkillManager {
|
|||||||
*/
|
*/
|
||||||
private FishingTreasure getFishingTreasure() {
|
private FishingTreasure getFishingTreasure() {
|
||||||
double diceRoll = Misc.getRandom().nextDouble() * 100;
|
double diceRoll = Misc.getRandom().nextDouble() * 100;
|
||||||
|
diceRoll -= getPlayer().getItemInHand().getEnchantmentLevel(Enchantment.LUCK);
|
||||||
|
|
||||||
FishingTreasure treasure = null;
|
FishingTreasure treasure = null;
|
||||||
|
|
||||||
for (Rarity rarity : Rarity.values()) {
|
for (Rarity rarity : Rarity.values()) {
|
||||||
|
|||||||
@@ -148,7 +148,12 @@ public class HerbalismManager extends SkillManager {
|
|||||||
processGreenThumbPlants(blockState, greenTerra);
|
processGreenThumbPlants(blockState, greenTerra);
|
||||||
}
|
}
|
||||||
|
|
||||||
xp = ExperienceConfig.getInstance().getXp(skill, material);
|
if (material == Material.DOUBLE_PLANT || material == Material.RED_ROSE || material == Material.LONG_GRASS) {
|
||||||
|
xp = ExperienceConfig.getInstance().getFlowerAndGrassXp(blockState.getData());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
xp = ExperienceConfig.getInstance().getXp(skill, material);
|
||||||
|
}
|
||||||
|
|
||||||
if (Config.getInstance().getDoubleDropsEnabled(skill, material) && Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HERBALISM_DOUBLE_DROPS)) {
|
if (Config.getInstance().getDoubleDropsEnabled(skill, material) && Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HERBALISM_DOUBLE_DROPS)) {
|
||||||
drops = blockState.getBlock().getDrops();
|
drops = blockState.getBlock().getDrops();
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.gmail.nossr50.skills.mining;
|
package com.gmail.nossr50.skills.mining;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
@@ -39,11 +39,13 @@ public class Mining {
|
|||||||
switch (blockType) {
|
switch (blockType) {
|
||||||
case ENDER_STONE:
|
case ENDER_STONE:
|
||||||
case GOLD_ORE:
|
case GOLD_ORE:
|
||||||
|
case HARD_CLAY:
|
||||||
case IRON_ORE:
|
case IRON_ORE:
|
||||||
case MOSSY_COBBLESTONE:
|
case MOSSY_COBBLESTONE:
|
||||||
case NETHERRACK:
|
case NETHERRACK:
|
||||||
case OBSIDIAN:
|
case OBSIDIAN:
|
||||||
case SANDSTONE:
|
case SANDSTONE:
|
||||||
|
case STAINED_CLAY:
|
||||||
handleMiningDrops(blockState);
|
handleMiningDrops(blockState);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -55,12 +57,13 @@ public class Mining {
|
|||||||
|
|
||||||
case COAL_ORE:
|
case COAL_ORE:
|
||||||
case DIAMOND_ORE:
|
case DIAMOND_ORE:
|
||||||
case REDSTONE_ORE:
|
case EMERALD_ORE:
|
||||||
case GLOWSTONE:
|
case GLOWSTONE:
|
||||||
case LAPIS_ORE:
|
case LAPIS_ORE:
|
||||||
case STONE:
|
case PACKED_ICE:
|
||||||
case EMERALD_ORE:
|
|
||||||
case QUARTZ_ORE:
|
case QUARTZ_ORE:
|
||||||
|
case REDSTONE_ORE:
|
||||||
|
case STONE:
|
||||||
Misc.dropItem(blockState.getLocation(), new ItemStack(blockType));
|
Misc.dropItem(blockState.getLocation(), new ItemStack(blockType));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -82,17 +85,20 @@ public class Mining {
|
|||||||
case COAL_ORE:
|
case COAL_ORE:
|
||||||
case DIAMOND_ORE:
|
case DIAMOND_ORE:
|
||||||
case EMERALD_ORE:
|
case EMERALD_ORE:
|
||||||
case GLOWSTONE:
|
|
||||||
case LAPIS_ORE:
|
|
||||||
case STONE:
|
|
||||||
case ENDER_STONE:
|
case ENDER_STONE:
|
||||||
|
case GLOWSTONE:
|
||||||
case GOLD_ORE:
|
case GOLD_ORE:
|
||||||
|
case HARD_CLAY:
|
||||||
case IRON_ORE:
|
case IRON_ORE:
|
||||||
|
case LAPIS_ORE:
|
||||||
case MOSSY_COBBLESTONE:
|
case MOSSY_COBBLESTONE:
|
||||||
case NETHERRACK:
|
case NETHERRACK:
|
||||||
case OBSIDIAN:
|
case OBSIDIAN:
|
||||||
|
case PACKED_ICE:
|
||||||
case REDSTONE_ORE:
|
case REDSTONE_ORE:
|
||||||
case SANDSTONE:
|
case SANDSTONE:
|
||||||
|
case STAINED_CLAY:
|
||||||
|
case STONE:
|
||||||
case QUARTZ_ORE:
|
case QUARTZ_ORE:
|
||||||
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
|
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ public class MiningManager extends SkillManager {
|
|||||||
/**
|
/**
|
||||||
* Handler for explosion drops and XP gain.
|
* Handler for explosion drops and XP gain.
|
||||||
*
|
*
|
||||||
* @param yield
|
* @param yield The % of blocks to drop
|
||||||
* @param blockList
|
* @param blockList The list of blocks to drop
|
||||||
*/
|
*/
|
||||||
public void blastMiningDropProcessing(float yield, List<Block> blockList) {
|
public void blastMiningDropProcessing(float yield, List<Block> blockList) {
|
||||||
List<BlockState> ores = new ArrayList<BlockState>();
|
List<BlockState> ores = new ArrayList<BlockState>();
|
||||||
|
|||||||
@@ -340,7 +340,7 @@ public class RepairManager extends SkillManager {
|
|||||||
if (getKeepEnchantChance() > Misc.getRandom().nextInt(activationChance)) {
|
if (getKeepEnchantChance() > Misc.getRandom().nextInt(activationChance)) {
|
||||||
int enchantLevel = enchant.getValue();
|
int enchantLevel = enchant.getValue();
|
||||||
|
|
||||||
if (ArcaneForging.arcaneForgingDowngrades && enchantLevel > 1 && getDowngradeEnchantChance() > Misc.getRandom().nextInt(activationChance)) {
|
if (ArcaneForging.arcaneForgingDowngrades && enchantLevel > 1 && (100 - getDowngradeEnchantChance()) <= Misc.getRandom().nextInt(activationChance)) {
|
||||||
item.addUnsafeEnchantment(enchantment, enchantLevel - 1);
|
item.addUnsafeEnchantment(enchantment, enchantLevel - 1);
|
||||||
downgraded = true;
|
downgraded = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.gmail.nossr50.skills.smelting;
|
package com.gmail.nossr50.skills.smelting;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.material.MaterialData;
|
import org.bukkit.material.MaterialData;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import com.gmail.nossr50.config.Config;
|
|||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.events.fake.FakeEntityTameEvent;
|
||||||
import com.gmail.nossr50.events.skills.secondaryabilities.SecondaryAbilityWeightedActivationCheckEvent;
|
import com.gmail.nossr50.events.skills.secondaryabilities.SecondaryAbilityWeightedActivationCheckEvent;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
|
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
|
||||||
@@ -145,7 +146,7 @@ public class TamingManager extends SkillManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
callOfTheWild(EntityType.OCELOT, Config.getInstance().getTamingCOTWOcelotCost());
|
callOfTheWild(EntityType.OCELOT, Config.getInstance().getTamingCOTWCost(EntityType.OCELOT));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -156,7 +157,7 @@ public class TamingManager extends SkillManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
callOfTheWild(EntityType.WOLF, Config.getInstance().getTamingCOTWWolfCost());
|
callOfTheWild(EntityType.WOLF, Config.getInstance().getTamingCOTWCost(EntityType.WOLF));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -167,7 +168,7 @@ public class TamingManager extends SkillManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
callOfTheWild(EntityType.HORSE, Config.getInstance().getTamingCOTWHorseCost());
|
callOfTheWild(EntityType.HORSE, Config.getInstance().getTamingCOTWCost(EntityType.HORSE));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -226,8 +227,16 @@ public class TamingManager extends SkillManager {
|
|||||||
for (int i = 0; i < amount; i++) {
|
for (int i = 0; i < amount; i++) {
|
||||||
LivingEntity entity = (LivingEntity) player.getWorld().spawnEntity(player.getLocation(), type);
|
LivingEntity entity = (LivingEntity) player.getWorld().spawnEntity(player.getLocation(), type);
|
||||||
|
|
||||||
|
FakeEntityTameEvent event = new FakeEntityTameEvent(entity, player);
|
||||||
|
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
if (event.isCancelled()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
entity.setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
|
entity.setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
|
||||||
((Tameable) entity).setOwner(player);
|
((Tameable) entity).setOwner(player);
|
||||||
|
entity.setRemoveWhenFarAway(false);
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case OCELOT:
|
case OCELOT:
|
||||||
@@ -246,7 +255,7 @@ public class TamingManager extends SkillManager {
|
|||||||
entity.setHealth(entity.getMaxHealth());
|
entity.setHealth(entity.getMaxHealth());
|
||||||
horse.setColor(Horse.Color.values()[Misc.getRandom().nextInt(Horse.Color.values().length)]);
|
horse.setColor(Horse.Color.values()[Misc.getRandom().nextInt(Horse.Color.values().length)]);
|
||||||
horse.setStyle(Horse.Style.values()[Misc.getRandom().nextInt(Horse.Style.values().length)]);
|
horse.setStyle(Horse.Style.values()[Misc.getRandom().nextInt(Horse.Style.values().length)]);
|
||||||
horse.setJumpStrength(Math.min(Math.min(Misc.getRandom().nextDouble(), Misc.getRandom().nextDouble()) * 2, AdvancedConfig.getInstance().getMaxHorseJumpStrength()));
|
horse.setJumpStrength(Math.max(AdvancedConfig.getInstance().getMinHorseJumpStrength(), Math.min(Math.min(Misc.getRandom().nextDouble(), Misc.getRandom().nextDouble()) * 2, AdvancedConfig.getInstance().getMaxHorseJumpStrength())));
|
||||||
//TODO: setSpeed, once available
|
//TODO: setSpeed, once available
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.TreeSpecies;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@@ -55,28 +56,19 @@ public final class Woodcutting {
|
|||||||
return mcMMO.getModManager().getBlock(blockState).getXpGain();
|
return mcMMO.getModManager().getBlock(blockState).getXpGain();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (((Tree) blockState.getData()).getSpecies()) {
|
//TODO Remove this workaround when casting to Tree works again
|
||||||
case GENERIC:
|
TreeSpecies species = TreeSpecies.GENERIC;
|
||||||
return ExperienceConfig.getInstance().getWoodcuttingXPOak();
|
if (blockState.getData() instanceof Tree) {
|
||||||
|
species = ((Tree) blockState.getData()).getSpecies();
|
||||||
case REDWOOD:
|
|
||||||
return ExperienceConfig.getInstance().getWoodcuttingXPSpruce();
|
|
||||||
|
|
||||||
case BIRCH:
|
|
||||||
return ExperienceConfig.getInstance().getWoodcuttingXPBirch();
|
|
||||||
|
|
||||||
case JUNGLE:
|
|
||||||
int xp = ExperienceConfig.getInstance().getWoodcuttingXPJungle();
|
|
||||||
|
|
||||||
if (experienceGainMethod == ExperienceGainMethod.TREE_FELLER) {
|
|
||||||
xp *= 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
return xp;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int xp = ExperienceConfig.getInstance().getWoodcuttingTreeXP(species);
|
||||||
|
|
||||||
|
if (species == TreeSpecies.JUNGLE && experienceGainMethod == ExperienceGainMethod.TREE_FELLER) {
|
||||||
|
xp *= 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
return xp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -89,33 +81,14 @@ public final class Woodcutting {
|
|||||||
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
|
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch (((Tree) blockState.getData()).getSpecies()) {
|
//TODO Remove this workaround when casting to Tree works again
|
||||||
case GENERIC:
|
TreeSpecies species = TreeSpecies.GENERIC;
|
||||||
if (Config.getInstance().getOakDoubleDropsEnabled()) {
|
if (blockState.getData() instanceof Tree) {
|
||||||
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
|
species = ((Tree) blockState.getData()).getSpecies();
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
|
|
||||||
case REDWOOD:
|
if (Config.getInstance().getWoodcuttingDoubleDropsEnabled(species)) {
|
||||||
if (Config.getInstance().getSpruceDoubleDropsEnabled()) {
|
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
|
||||||
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case BIRCH:
|
|
||||||
if (Config.getInstance().getBirchDoubleDropsEnabled()) {
|
|
||||||
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case JUNGLE:
|
|
||||||
if (Config.getInstance().getJungleDoubleDropsEnabled()) {
|
|
||||||
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.gmail.nossr50.skills.woodcutting;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
@@ -12,6 +11,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.material.Tree;
|
import org.bukkit.material.Tree;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||||
@@ -140,11 +140,15 @@ public class WoodcuttingManager extends SkillManager {
|
|||||||
Misc.dropItems(blockState.getLocation(), block.getDrops());
|
Misc.dropItems(blockState.getLocation(), block.getDrops());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Tree tree = (Tree) blockState.getData();
|
//TODO Remove this workaround when casting to Tree works again
|
||||||
tree.setDirection(BlockFace.UP);
|
if (blockState.getData() instanceof Tree) {
|
||||||
|
Tree tree = (Tree) blockState.getData();
|
||||||
|
tree.setDirection(BlockFace.UP);
|
||||||
|
}
|
||||||
|
|
||||||
switch (material) {
|
switch (material) {
|
||||||
case LOG:
|
case LOG:
|
||||||
|
case LOG_2:
|
||||||
if (canGetDoubleDrops()) {
|
if (canGetDoubleDrops()) {
|
||||||
Woodcutting.checkForDoubleDrop(blockState);
|
Woodcutting.checkForDoubleDrop(blockState);
|
||||||
}
|
}
|
||||||
@@ -153,6 +157,7 @@ public class WoodcuttingManager extends SkillManager {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LEAVES:
|
case LEAVES:
|
||||||
|
case LEAVES_2:
|
||||||
Misc.dropItems(blockState.getLocation(), block.getDrops());
|
Misc.dropItems(blockState.getLocation(), block.getDrops());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.gmail.nossr50.util;
|
|||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import org.bukkit.CropState;
|
import org.bukkit.CropState;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.NetherWartsState;
|
import org.bukkit.NetherWartsState;
|
||||||
@@ -13,6 +12,7 @@ import org.bukkit.material.Crops;
|
|||||||
import org.bukkit.material.NetherWarts;
|
import org.bukkit.material.NetherWarts;
|
||||||
import org.bukkit.material.SmoothBrick;
|
import org.bukkit.material.SmoothBrick;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.skills.repair.Repair;
|
import com.gmail.nossr50.skills.repair.Repair;
|
||||||
|
|
||||||
public final class BlockUtils {
|
public final class BlockUtils {
|
||||||
@@ -112,7 +112,9 @@ public final class BlockUtils {
|
|||||||
switch (blockState.getType()) {
|
switch (blockState.getType()) {
|
||||||
case BROWN_MUSHROOM:
|
case BROWN_MUSHROOM:
|
||||||
case CACTUS:
|
case CACTUS:
|
||||||
|
case DOUBLE_PLANT:
|
||||||
case MELON_BLOCK:
|
case MELON_BLOCK:
|
||||||
|
case LONG_GRASS:
|
||||||
case PUMPKIN:
|
case PUMPKIN:
|
||||||
case RED_MUSHROOM:
|
case RED_MUSHROOM:
|
||||||
case RED_ROSE:
|
case RED_ROSE:
|
||||||
@@ -150,10 +152,13 @@ public final class BlockUtils {
|
|||||||
switch (blockState.getType()) {
|
switch (blockState.getType()) {
|
||||||
case ENDER_STONE:
|
case ENDER_STONE:
|
||||||
case GLOWSTONE:
|
case GLOWSTONE:
|
||||||
|
case HARD_CLAY:
|
||||||
case MOSSY_COBBLESTONE:
|
case MOSSY_COBBLESTONE:
|
||||||
case NETHERRACK:
|
case NETHERRACK:
|
||||||
case OBSIDIAN:
|
case OBSIDIAN:
|
||||||
|
case PACKED_ICE:
|
||||||
case SANDSTONE:
|
case SANDSTONE:
|
||||||
|
case STAINED_CLAY:
|
||||||
case STONE:
|
case STONE:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -195,6 +200,7 @@ public final class BlockUtils {
|
|||||||
public static boolean isLog(BlockState blockState) {
|
public static boolean isLog(BlockState blockState) {
|
||||||
switch (blockState.getType()) {
|
switch (blockState.getType()) {
|
||||||
case LOG:
|
case LOG:
|
||||||
|
case LOG_2:
|
||||||
case HUGE_MUSHROOM_1:
|
case HUGE_MUSHROOM_1:
|
||||||
case HUGE_MUSHROOM_2:
|
case HUGE_MUSHROOM_2:
|
||||||
return true;
|
return true;
|
||||||
@@ -213,6 +219,7 @@ public final class BlockUtils {
|
|||||||
public static boolean isLeaves(BlockState blockState) {
|
public static boolean isLeaves(BlockState blockState) {
|
||||||
switch (blockState.getType()) {
|
switch (blockState.getType()) {
|
||||||
case LEAVES:
|
case LEAVES:
|
||||||
|
case LEAVES_2:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -275,7 +282,7 @@ public final class BlockUtils {
|
|||||||
* Determine if a given block can be made into Mycelium
|
* Determine if a given block can be made into Mycelium
|
||||||
*
|
*
|
||||||
* @param blockState The {@link BlockState} of the block to check
|
* @param blockState The {@link BlockState} of the block to check
|
||||||
* @return true if the block can be made in Mycelium, false otherwise
|
* @return true if the block can be made into Mycelium, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean canMakeShroomy(BlockState blockState) {
|
public static boolean canMakeShroomy(BlockState blockState) {
|
||||||
switch (blockState.getType()) {
|
switch (blockState.getType()) {
|
||||||
|
|||||||
@@ -10,8 +10,10 @@ import java.util.ArrayList;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.EnumSet;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@@ -19,25 +21,95 @@ import org.bukkit.Color;
|
|||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.FireworkEffect;
|
import org.bukkit.FireworkEffect;
|
||||||
import org.bukkit.FireworkEffect.Type;
|
import org.bukkit.FireworkEffect.Type;
|
||||||
|
import org.bukkit.Sound;
|
||||||
|
import org.bukkit.Statistic;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.PluginCommand;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Firework;
|
import org.bukkit.entity.Firework;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.player.PlayerStatisticIncrementEvent;
|
||||||
import org.bukkit.inventory.meta.FireworkMeta;
|
import org.bukkit.inventory.meta.FireworkMeta;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.commands.skills.AprilCommand;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
public final class HolidayManager {
|
public final class HolidayManager {
|
||||||
private ArrayList<String> hasCelebrated;
|
private ArrayList<String> hasCelebrated;
|
||||||
private int currentYear;
|
private int currentYear;
|
||||||
private final int startYear = 2011;
|
private static final int START_YEAR = 2011;
|
||||||
|
|
||||||
private static final List<Color> ALL_COLORS;
|
private static final List<Color> ALL_COLORS;
|
||||||
private static final List<ChatColor> ALL_CHAT_COLORS;
|
private static final List<ChatColor> ALL_CHAT_COLORS;
|
||||||
private static final List<ChatColor> CHAT_FORMATS;
|
private static final List<ChatColor> CHAT_FORMATS;
|
||||||
|
|
||||||
|
public enum FakeSkillType {
|
||||||
|
MACHO,
|
||||||
|
JUMPING,
|
||||||
|
THROWING,
|
||||||
|
WRECKING,
|
||||||
|
CRAFTING,
|
||||||
|
WALKING,
|
||||||
|
SWIMMING,
|
||||||
|
FALLING,
|
||||||
|
CLIMBING,
|
||||||
|
FLYING,
|
||||||
|
DIVING,
|
||||||
|
PIGGY,
|
||||||
|
UNKNOWN;
|
||||||
|
|
||||||
|
public static FakeSkillType getByName(String skillName) {
|
||||||
|
for (FakeSkillType type : values()) {
|
||||||
|
if (type.name().equalsIgnoreCase(skillName)) {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FakeSkillType getByStatistic(Statistic statistic) {
|
||||||
|
switch (statistic) {
|
||||||
|
case DAMAGE_TAKEN:
|
||||||
|
return FakeSkillType.MACHO;
|
||||||
|
case JUMP:
|
||||||
|
return FakeSkillType.JUMPING;
|
||||||
|
case DROP:
|
||||||
|
return FakeSkillType.THROWING;
|
||||||
|
case MINE_BLOCK:
|
||||||
|
case BREAK_ITEM:
|
||||||
|
return FakeSkillType.WRECKING;
|
||||||
|
case CRAFT_ITEM:
|
||||||
|
return FakeSkillType.CRAFTING;
|
||||||
|
case WALK_ONE_CM:
|
||||||
|
return FakeSkillType.WALKING;
|
||||||
|
case SWIM_ONE_CM:
|
||||||
|
return FakeSkillType.SWIMMING;
|
||||||
|
case FALL_ONE_CM:
|
||||||
|
return FakeSkillType.FALLING;
|
||||||
|
case CLIMB_ONE_CM:
|
||||||
|
return FakeSkillType.CLIMBING;
|
||||||
|
case FLY_ONE_CM:
|
||||||
|
return FakeSkillType.FLYING;
|
||||||
|
case DIVE_ONE_CM:
|
||||||
|
return FakeSkillType.DIVING;
|
||||||
|
case PIG_ONE_CM:
|
||||||
|
return FakeSkillType.PIGGY;
|
||||||
|
default:
|
||||||
|
return FakeSkillType.UNKNOWN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public final Set<Statistic> movementStatistics = EnumSet.of(
|
||||||
|
Statistic.WALK_ONE_CM, Statistic.SWIM_ONE_CM, Statistic.FALL_ONE_CM,
|
||||||
|
Statistic.CLIMB_ONE_CM, Statistic.FLY_ONE_CM, Statistic.DIVE_ONE_CM,
|
||||||
|
Statistic.PIG_ONE_CM);
|
||||||
|
|
||||||
static {
|
static {
|
||||||
List<Color> colors = new ArrayList<Color>();
|
List<Color> colors = new ArrayList<Color>();
|
||||||
List<ChatColor> chatColors = new ArrayList<ChatColor>();
|
List<ChatColor> chatColors = new ArrayList<ChatColor>();
|
||||||
@@ -165,7 +237,7 @@ public final class HolidayManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(ChatColor.BLUE + "Happy " + (currentYear - startYear) + " Year Anniversary! In honor of all of");
|
sender.sendMessage(ChatColor.BLUE + "Happy " + (currentYear - START_YEAR) + " Year Anniversary! In honor of all of");
|
||||||
sender.sendMessage(ChatColor.BLUE + "nossr50's work and all the devs, here's a firework show!");
|
sender.sendMessage(ChatColor.BLUE + "nossr50's work and all the devs, here's a firework show!");
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
final int firework_amount = 10;
|
final int firework_amount = 10;
|
||||||
@@ -221,11 +293,11 @@ public final class HolidayManager {
|
|||||||
hasCelebrated.add(sender.getName());
|
hasCelebrated.add(sender.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean getDateRange(Date date, Date start, Date end) {
|
public boolean getDateRange(Date date, Date start, Date end) {
|
||||||
return !(date.before(start) || date.after(end));
|
return !(date.before(start) || date.after(end));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void spawnFireworks(Player player) {
|
public void spawnFireworks(Player player) {
|
||||||
int power = Misc.getRandom().nextInt(3) + 1;
|
int power = Misc.getRandom().nextInt(3) + 1;
|
||||||
Type fireworkType = Type.values()[Misc.getRandom().nextInt(Type.values().length)];
|
Type fireworkType = Type.values()[Misc.getRandom().nextInt(Type.values().length)];
|
||||||
double varX = Misc.getRandom().nextGaussian() * 3;
|
double varX = Misc.getRandom().nextGaussian() * 3;
|
||||||
@@ -254,4 +326,62 @@ public final class HolidayManager {
|
|||||||
|
|
||||||
return ret.toString();
|
return ret.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isAprilFirst() {
|
||||||
|
GregorianCalendar aprilFirst = new GregorianCalendar(currentYear, Calendar.APRIL, 1);
|
||||||
|
GregorianCalendar aprilSecond = new GregorianCalendar(currentYear, Calendar.APRIL, 2);
|
||||||
|
GregorianCalendar day = new GregorianCalendar();
|
||||||
|
return getDateRange(day.getTime(), aprilFirst.getTime(), aprilSecond.getTime());
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean nearingAprilFirst() {
|
||||||
|
GregorianCalendar start = new GregorianCalendar(Calendar.getInstance().get(Calendar.YEAR), Calendar.MARCH, 28);
|
||||||
|
GregorianCalendar end = new GregorianCalendar(Calendar.getInstance().get(Calendar.YEAR), Calendar.APRIL, 2);
|
||||||
|
GregorianCalendar day = new GregorianCalendar();
|
||||||
|
|
||||||
|
return mcMMO.getHolidayManager().getDateRange(day.getTime(), start.getTime(), end.getTime());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void handleStatisticEvent(PlayerStatisticIncrementEvent event) {Player player = event.getPlayer();
|
||||||
|
Statistic statistic = event.getStatistic();
|
||||||
|
int newValue = event.getNewValue();
|
||||||
|
|
||||||
|
int modifier;
|
||||||
|
switch (statistic) {
|
||||||
|
case DAMAGE_TAKEN:
|
||||||
|
modifier = 500;
|
||||||
|
break;
|
||||||
|
case JUMP:
|
||||||
|
modifier = 500;
|
||||||
|
break;
|
||||||
|
case DROP:
|
||||||
|
modifier = 200;
|
||||||
|
break;
|
||||||
|
case MINE_BLOCK:
|
||||||
|
case BREAK_ITEM:
|
||||||
|
modifier = 500;
|
||||||
|
break;
|
||||||
|
case CRAFT_ITEM:
|
||||||
|
modifier = 100;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newValue % modifier == 0) {
|
||||||
|
mcMMO.p.getHolidayManager().levelUpApril(player, FakeSkillType.getByStatistic(statistic));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void levelUpApril(Player player, FakeSkillType fakeSkillType) {
|
||||||
|
int levelTotal = Misc.getRandom().nextInt(UserManager.getPlayer(player).getSkillLevel(SkillType.MINING)) + 1;
|
||||||
|
player.playSound(player.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH);
|
||||||
|
player.sendMessage(ChatColor.YELLOW + StringUtils.getCapitalized(fakeSkillType.toString()) + " skill increased by 1. Total (" + levelTotal + ")");
|
||||||
|
ParticleEffectUtils.fireworkParticleShower(player, ALL_COLORS.get(Misc.getRandom().nextInt(ALL_COLORS.size())));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registerAprilCommand() {
|
||||||
|
PluginCommand command = mcMMO.p.getCommand("mcfools");
|
||||||
|
command.setExecutor(new AprilCommand());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
package com.gmail.nossr50.util;
|
package com.gmail.nossr50.util;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.CoalType;
|
||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.inventory.FurnaceRecipe;
|
import org.bukkit.inventory.FurnaceRecipe;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.Recipe;
|
import org.bukkit.inventory.Recipe;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
import org.bukkit.material.Coal;
|
||||||
import org.bukkit.material.Dye;
|
import org.bukkit.material.Dye;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
@@ -498,11 +500,7 @@ public final class ItemUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSmeltable(ItemStack item) {
|
public static boolean isSmeltable(ItemStack item) {
|
||||||
if (item == null) {
|
return item != null && MaterialUtils.isOre(item.getData());
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return MaterialUtils.isOre(item.getData());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSmelted(ItemStack item) {
|
public static boolean isSmelted(ItemStack item) {
|
||||||
@@ -590,6 +588,8 @@ public final class ItemUtils {
|
|||||||
case PUMPKIN_SEEDS:
|
case PUMPKIN_SEEDS:
|
||||||
case WATER_LILY:
|
case WATER_LILY:
|
||||||
case VINE:
|
case VINE:
|
||||||
|
case LONG_GRASS:
|
||||||
|
case DOUBLE_PLANT:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case INK_SACK:
|
case INK_SACK:
|
||||||
@@ -618,7 +618,6 @@ public final class ItemUtils {
|
|||||||
case PORK:
|
case PORK:
|
||||||
case GRILLED_PORK:
|
case GRILLED_PORK:
|
||||||
case WOOL:
|
case WOOL:
|
||||||
case RED_ROSE: // Not sure we should include this, as it will also trigger from herbalism
|
|
||||||
case IRON_INGOT:
|
case IRON_INGOT:
|
||||||
case SNOW_BALL:
|
case SNOW_BALL:
|
||||||
case BLAZE_ROD:
|
case BLAZE_ROD:
|
||||||
@@ -631,12 +630,17 @@ public final class ItemUtils {
|
|||||||
case ARROW:
|
case ARROW:
|
||||||
case SLIME_BALL:
|
case SLIME_BALL:
|
||||||
case NETHER_STAR:
|
case NETHER_STAR:
|
||||||
case COAL: // Not sure we should include this, as it will also trigger when mining
|
|
||||||
case ROTTEN_FLESH:
|
case ROTTEN_FLESH:
|
||||||
case GOLD_NUGGET:
|
case GOLD_NUGGET:
|
||||||
case EGG:
|
case EGG:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
case COAL: // Not sure we should include this, as it will also trigger when mining
|
||||||
|
return (((Coal) item.getData()).getType() == CoalType.COAL);
|
||||||
|
|
||||||
|
case RED_ROSE: // Not sure we should include this, as it will also trigger from herbalism
|
||||||
|
return (item.getData().getData() == 0x0);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -651,7 +655,9 @@ public final class ItemUtils {
|
|||||||
public static boolean isWoodcuttingDrop(ItemStack item) {
|
public static boolean isWoodcuttingDrop(ItemStack item) {
|
||||||
switch (item.getType()) {
|
switch (item.getType()) {
|
||||||
case LOG:
|
case LOG:
|
||||||
|
case LOG_2:
|
||||||
case LEAVES:
|
case LEAVES:
|
||||||
|
case LEAVES_2:
|
||||||
case SAPLING:
|
case SAPLING:
|
||||||
case APPLE:
|
case APPLE:
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
package com.gmail.nossr50.util;
|
package com.gmail.nossr50.util;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import org.bukkit.material.MaterialData;
|
import org.bukkit.material.MaterialData;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
|
||||||
public final class MaterialUtils {
|
public final class MaterialUtils {
|
||||||
private MaterialUtils() {}
|
private MaterialUtils() {}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ public final class Misc {
|
|||||||
public static final int TIME_CONVERSION_FACTOR = 1000;
|
public static final int TIME_CONVERSION_FACTOR = 1000;
|
||||||
public static final int TICK_CONVERSION_FACTOR = 20;
|
public static final int TICK_CONVERSION_FACTOR = 20;
|
||||||
|
|
||||||
public static final long PLAYER_DATABASE_COOLDOWN_MILLIS = 1750;
|
|
||||||
public static final int PLAYER_RESPAWN_COOLDOWN_SECONDS = 5;
|
public static final int PLAYER_RESPAWN_COOLDOWN_SECONDS = 5;
|
||||||
public static final double SKILL_MESSAGE_MAX_SENDING_DISTANCE = 10.0;
|
public static final double SKILL_MESSAGE_MAX_SENDING_DISTANCE = 10.0;
|
||||||
|
|
||||||
@@ -64,11 +63,7 @@ public final class Misc {
|
|||||||
* @return true if the distance between {@code first} and {@code second} is less than {@code maxDistance}, false otherwise
|
* @return true if the distance between {@code first} and {@code second} is less than {@code maxDistance}, false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isNear(Location first, Location second, double maxDistance) {
|
public static boolean isNear(Location first, Location second, double maxDistance) {
|
||||||
if (first.getWorld() != second.getWorld()) {
|
return (first.getWorld() == second.getWorld()) && (first.distanceSquared(second) < (maxDistance * maxDistance) || maxDistance == 0);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return first.distanceSquared(second) < (maxDistance * maxDistance) || maxDistance == 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void dropItems(Location location, Collection<ItemStack> drops) {
|
public static void dropItems(Location location, Collection<ItemStack> drops) {
|
||||||
@@ -90,41 +85,6 @@ public final class Misc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Randomly drop an item at a given location.
|
|
||||||
*
|
|
||||||
* @param location The location to drop the items at
|
|
||||||
* @param is The item to drop
|
|
||||||
* @param chance The percentage chance for the item to drop
|
|
||||||
*/
|
|
||||||
public static void randomDropItem(Location location, ItemStack is, double chance) {
|
|
||||||
if (random.nextInt(100) < chance) {
|
|
||||||
dropItem(location, is);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Drop items with random quantity at a given location.
|
|
||||||
*
|
|
||||||
* @param location The location to drop the items at
|
|
||||||
* @param is The item to drop
|
|
||||||
* @param quantity The amount of items to drop
|
|
||||||
*/
|
|
||||||
public static void randomDropItems(Location location, ItemStack is, int quantity) {
|
|
||||||
int dropCount = random.nextInt(quantity + 1);
|
|
||||||
|
|
||||||
if (dropCount > 0) {
|
|
||||||
is.setAmount(dropCount);
|
|
||||||
dropItem(location, is);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void randomDropItems(Location location, Collection<ItemStack> drops, double chance) {
|
|
||||||
for (ItemStack item : drops) {
|
|
||||||
randomDropItem(location, item, chance);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drop an item at a given location.
|
* Drop an item at a given location.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,18 @@
|
|||||||
package com.gmail.nossr50.util;
|
package com.gmail.nossr50.util;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.block.BlockState;
|
||||||
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.material.MaterialData;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.mods.CustomArmorConfig;
|
import com.gmail.nossr50.config.mods.CustomArmorConfig;
|
||||||
import com.gmail.nossr50.config.mods.CustomBlockConfig;
|
import com.gmail.nossr50.config.mods.CustomBlockConfig;
|
||||||
@@ -8,19 +21,7 @@ import com.gmail.nossr50.config.mods.CustomToolConfig;
|
|||||||
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
||||||
import com.gmail.nossr50.datatypes.mods.CustomEntity;
|
import com.gmail.nossr50.datatypes.mods.CustomEntity;
|
||||||
import com.gmail.nossr50.datatypes.mods.CustomTool;
|
import com.gmail.nossr50.datatypes.mods.CustomTool;
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.block.BlockState;
|
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
|
||||||
import org.bukkit.entity.Entity;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.bukkit.material.MaterialData;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ModManager {
|
public class ModManager {
|
||||||
private List<Repairable> repairables = new ArrayList<Repairable>();
|
private List<Repairable> repairables = new ArrayList<Repairable>();
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.gmail.nossr50.util;
|
package com.gmail.nossr50.util;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.TreeSpecies;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||||
@@ -30,6 +31,10 @@ public class StringUtils {
|
|||||||
return createPrettyEnumString(ability.toString());
|
return createPrettyEnumString(ability.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getPrettyTreeSpeciesString(TreeSpecies species) {
|
||||||
|
return createPrettyEnumString(species.toString());
|
||||||
|
}
|
||||||
|
|
||||||
public static String getPrettySecondaryAbilityString(SecondaryAbility secondaryAbility) {
|
public static String getPrettySecondaryAbilityString(SecondaryAbility secondaryAbility) {
|
||||||
switch (secondaryAbility) {
|
switch (secondaryAbility) {
|
||||||
case HERBALISM_DOUBLE_DROPS:
|
case HERBALISM_DOUBLE_DROPS:
|
||||||
|
|||||||
@@ -90,6 +90,10 @@ public final class CommandUtils {
|
|||||||
*/
|
*/
|
||||||
public static boolean checkPlayerExistence(CommandSender sender, String playerName, McMMOPlayer mcMMOPlayer) {
|
public static boolean checkPlayerExistence(CommandSender sender, String playerName, McMMOPlayer mcMMOPlayer) {
|
||||||
if (mcMMOPlayer != null) {
|
if (mcMMOPlayer != null) {
|
||||||
|
if (CommandUtils.hidden(sender, mcMMOPlayer.getPlayer(), false)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Offline"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,6 +220,19 @@ public final class CommandUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<String> getOnlinePlayerNames(CommandSender sender) {
|
||||||
|
Player player = sender instanceof Player ? (Player) sender : null;
|
||||||
|
List<String> onlinePlayerNames = new ArrayList<String>();
|
||||||
|
|
||||||
|
for (Player onlinePlayer : mcMMO.p.getServer().getOnlinePlayers()) {
|
||||||
|
if (player != null && player.canSee(onlinePlayer)) {
|
||||||
|
onlinePlayerNames.add(onlinePlayer.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return onlinePlayerNames;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a matched player name if one was found in the database.
|
* Get a matched player name if one was found in the database.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ package com.gmail.nossr50.util.player;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
@@ -60,16 +58,6 @@ public final class UserManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Set<String> getPlayerNames() {
|
|
||||||
Set<String> playerNames = new HashSet<String>();
|
|
||||||
|
|
||||||
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
|
||||||
playerNames.add(player.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
return playerNames;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Collection<McMMOPlayer> getPlayers() {
|
public static Collection<McMMOPlayer> getPlayers() {
|
||||||
Collection<McMMOPlayer> playerCollection = new ArrayList<McMMOPlayer>();
|
Collection<McMMOPlayer> playerCollection = new ArrayList<McMMOPlayer>();
|
||||||
|
|
||||||
@@ -90,28 +78,16 @@ public final class UserManager {
|
|||||||
return retrieveMcMMOPlayer(playerName, false);
|
return retrieveMcMMOPlayer(playerName, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static McMMOPlayer getOfflinePlayer(OfflinePlayer player) {
|
||||||
* Get the McMMOPlayer of a player.
|
|
||||||
*
|
|
||||||
* @param player The player whose McMMOPlayer to retrieve
|
|
||||||
* @return the player's McMMOPlayer object
|
|
||||||
*/
|
|
||||||
public static McMMOPlayer getPlayer(OfflinePlayer player) {
|
|
||||||
if (player instanceof Player) {
|
if (player instanceof Player) {
|
||||||
return getPlayer((Player) player);
|
return getPlayer((Player) player);
|
||||||
}
|
}
|
||||||
return retrieveMcMMOPlayer(player.getName(), false);
|
|
||||||
|
return retrieveMcMMOPlayer(player.getName(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static McMMOPlayer getPlayer(OfflinePlayer player, boolean offlineValid) {
|
public static McMMOPlayer getOfflinePlayer(String playerName) {
|
||||||
if (player instanceof Player) {
|
return retrieveMcMMOPlayer(playerName, true);
|
||||||
return getPlayer((Player) player);
|
|
||||||
}
|
|
||||||
return retrieveMcMMOPlayer(player.getName(), offlineValid);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static McMMOPlayer getPlayer(String playerName, boolean offlineValid) {
|
|
||||||
return retrieveMcMMOPlayer(playerName, offlineValid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static McMMOPlayer getPlayer(Player player) {
|
public static McMMOPlayer getPlayer(Player player) {
|
||||||
@@ -133,10 +109,6 @@ public final class UserManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasPlayerDataKey(Entity entity) {
|
public static boolean hasPlayerDataKey(Entity entity) {
|
||||||
if (entity == null) {
|
return entity != null && entity.hasMetadata(mcMMO.playerDataKey);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return entity.hasMetadata(mcMMO.playerDataKey);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ public class ScoreboardManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (String playerName : dirtyPowerLevels) {
|
for (String playerName : dirtyPowerLevels) {
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
McMMOPlayer mcMMOPlayer = UserManager.getOfflinePlayer(playerName);
|
||||||
|
|
||||||
if (mcMMOPlayer == null) {
|
if (mcMMOPlayer == null) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
|||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.projectiles.ProjectileSource;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
@@ -262,10 +263,10 @@ public final class CombatUtils {
|
|||||||
}
|
}
|
||||||
else if (entityType == EntityType.ARROW) {
|
else if (entityType == EntityType.ARROW) {
|
||||||
Arrow arrow = (Arrow) damager;
|
Arrow arrow = (Arrow) damager;
|
||||||
LivingEntity shooter = arrow.getShooter();
|
ProjectileSource projectileSource = arrow.getShooter();
|
||||||
|
|
||||||
if (shooter != null && shooter instanceof Player && SkillType.ARCHERY.shouldProcess(target)) {
|
if (projectileSource != null && projectileSource instanceof Player && SkillType.ARCHERY.shouldProcess(target)) {
|
||||||
Player player = (Player) shooter;
|
Player player = (Player) projectileSource;
|
||||||
|
|
||||||
if (!Misc.isNPCEntity(player) && SkillType.ARCHERY.getPermissions(player)) {
|
if (!Misc.isNPCEntity(player) && SkillType.ARCHERY.getPermissions(player)) {
|
||||||
processArcheryCombat(target, player, event, arrow);
|
processArcheryCombat(target, player, event, arrow);
|
||||||
@@ -298,15 +299,6 @@ public final class CombatUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (attacker instanceof Player) {
|
|
||||||
Player player = (Player) attacker;
|
|
||||||
|
|
||||||
if (Misc.isNPCEntity(player) || Misc.isNPCEntity(target)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
MobHealthbarUtils.handleMobHealthbars(player, target, event.getDamage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -506,7 +498,7 @@ public final class CombatUtils {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PartyManager.inSameParty(player, defender) && !(Permissions.friendlyFire(player) && Permissions.friendlyFire(defender))) {
|
if ((PartyManager.inSameParty(player, defender) || PartyManager.areAllies(player, defender)) && !(Permissions.friendlyFire(player) && Permissions.friendlyFire(defender))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -558,7 +550,7 @@ public final class CombatUtils {
|
|||||||
if (tamer instanceof Player) {
|
if (tamer instanceof Player) {
|
||||||
Player owner = (Player) tamer;
|
Player owner = (Player) tamer;
|
||||||
|
|
||||||
return (owner == attacker || PartyManager.inSameParty(attacker, owner));
|
return (owner == attacker || PartyManager.inSameParty(attacker, owner) || PartyManager.areAllies(attacker, owner));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -614,4 +606,18 @@ public final class CombatUtils {
|
|||||||
|
|
||||||
return tier;
|
return tier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void handleHealthbars(Entity attacker, LivingEntity target, double damage) {
|
||||||
|
if (!(attacker instanceof Player)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player player = (Player) attacker;
|
||||||
|
|
||||||
|
if (Misc.isNPCEntity(player) || Misc.isNPCEntity(target)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MobHealthbarUtils.handleMobHealthbars(player, target, damage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ import java.util.zip.ZipFile;
|
|||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
|
||||||
import org.json.simple.JSONArray;
|
import org.json.simple.JSONArray;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
import org.json.simple.JSONValue;
|
import org.json.simple.JSONValue;
|
||||||
@@ -440,14 +442,14 @@ public class Updater {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check release vs. beta & dev
|
// Check release vs. beta & SNAPSHOT
|
||||||
if (newTokens.length == 1 && oldTokens.length == 3 && oldVersion == newVersion) {
|
if (newTokens.length == 1 && oldTokens.length == 3 && oldVersion == newVersion) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check beta vs. dev
|
// Check beta vs. SNAPSHOT
|
||||||
if (version.contains("dev") && title.contains("beta")) {
|
if (version.contains("SNAPSHOT") && title.contains("beta")) {
|
||||||
if (Integer.parseInt(oldTokens[1].substring(3)) <= Integer.parseInt(newTokens[1].substring(4))) {
|
if (Integer.parseInt(oldTokens[1].substring(8)) <= Integer.parseInt(newTokens[1].substring(4))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,7 +467,7 @@ public class Updater {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldTokens.length == 3 && !version.contains("beta") && !version.contains("dev")) {
|
if (oldTokens.length == 3 && !version.contains("beta") && !version.contains("SNAPSHOT")) {
|
||||||
plugin.getLogger().warning("Could not get information about this mcMMO version; perhaps you are running a custom one?");
|
plugin.getLogger().warning("Could not get information about this mcMMO version; perhaps you are running a custom one?");
|
||||||
result = UpdateResult.FAIL_NOVERSION;
|
result = UpdateResult.FAIL_NOVERSION;
|
||||||
return false;
|
return false;
|
||||||
@@ -519,7 +521,11 @@ public class Updater {
|
|||||||
this.plugin.getLogger().warning("If you have not recently modified your configuration and this is the first time you are seeing this message, the site may be experiencing temporary downtime.");
|
this.plugin.getLogger().warning("If you have not recently modified your configuration and this is the first time you are seeing this message, the site may be experiencing temporary downtime.");
|
||||||
this.result = UpdateResult.FAIL_DBO;
|
this.result = UpdateResult.FAIL_DBO;
|
||||||
}
|
}
|
||||||
e.printStackTrace();
|
|
||||||
|
if (Config.getInstance().getVerboseLoggingEnabled()) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -471,7 +471,9 @@ Skills:
|
|||||||
Bonus: 2.0
|
Bonus: 2.0
|
||||||
|
|
||||||
CallOfTheWild:
|
CallOfTheWild:
|
||||||
|
# MinHorseJumpStrength: The minimum jump strength a summoned horse must have
|
||||||
# MaxHorseJumpStrength: The maximum jump strength a summoned horse can have
|
# MaxHorseJumpStrength: The maximum jump strength a summoned horse can have
|
||||||
|
MinHorseJumpStrength: 0.7
|
||||||
MaxHorseJumpStrength: 2.0
|
MaxHorseJumpStrength: 2.0
|
||||||
#
|
#
|
||||||
# Settings for Unarmed
|
# Settings for Unarmed
|
||||||
|
|||||||
@@ -267,7 +267,8 @@ Skills:
|
|||||||
Prevent_AFK_Leveling: true
|
Prevent_AFK_Leveling: true
|
||||||
Max_Tries_At_Same_Location: 3
|
Max_Tries_At_Same_Location: 3
|
||||||
Prevent_Dodge_Lightning: false
|
Prevent_Dodge_Lightning: false
|
||||||
Prevent_XP_After_Teleport: true
|
# Prevent earning Acrobatics XP a few seconds after teleporting
|
||||||
|
XP_After_Teleport_Cooldown: 5
|
||||||
Level_Cap: 0
|
Level_Cap: 0
|
||||||
Alchemy:
|
Alchemy:
|
||||||
# Allow Hoppers to transfer ingredients and brew Rank 1 Alchemy potions
|
# Allow Hoppers to transfer ingredients and brew Rank 1 Alchemy potions
|
||||||
@@ -286,8 +287,11 @@ Skills:
|
|||||||
Excavation:
|
Excavation:
|
||||||
Level_Cap: 0
|
Level_Cap: 0
|
||||||
Fishing:
|
Fishing:
|
||||||
Drops_Enabled: true
|
|
||||||
Level_Cap: 0
|
Level_Cap: 0
|
||||||
|
Drops_Enabled: true
|
||||||
|
Override_Vanilla_Treasures: true
|
||||||
|
# Always catch fish, even when treasure is found
|
||||||
|
Extra_Fish: false
|
||||||
Herbalism:
|
Herbalism:
|
||||||
Level_Cap: 0
|
Level_Cap: 0
|
||||||
Prevent_AFK_Leveling: true
|
Prevent_AFK_Leveling: true
|
||||||
@@ -316,16 +320,24 @@ Skills:
|
|||||||
Enabled_For_PVE: true
|
Enabled_For_PVE: true
|
||||||
Level_Cap: 0
|
Level_Cap: 0
|
||||||
Call_Of_The_Wild:
|
Call_Of_The_Wild:
|
||||||
Bones_Required: 10
|
# Item_Material: Material of the item needed to summon the pet
|
||||||
Fish_Required: 10
|
# Item_Amount: Amount of items required to summon the pet
|
||||||
Apples_Required: 10
|
# Summon_Amount: Amount of pets to summon when using Call Of The Wild
|
||||||
|
Wolf:
|
||||||
|
Item_Material: BONE
|
||||||
|
Item_Amount: 10
|
||||||
|
Summon_Amount: 1
|
||||||
|
Ocelot:
|
||||||
|
Item_Material: RAW_FISH
|
||||||
|
Item_Amount: 10
|
||||||
|
Summon_Amount: 1
|
||||||
|
Horse:
|
||||||
|
Item_Material: APPLE
|
||||||
|
Item_Amount: 10
|
||||||
|
Summon_Amount: 1
|
||||||
|
|
||||||
# Range to check for nearby pets when using Call Of The Wild, 0 will disable the check
|
# Range to check for nearby pets when using Call Of The Wild, 0 will disable the check
|
||||||
Range: 40.0
|
Range: 40.0
|
||||||
# Amount of pets to summon when using Call Of The Wild
|
|
||||||
Wolf_Amount: 1
|
|
||||||
Ocelot_Amount: 1
|
|
||||||
Horse_Amount: 1
|
|
||||||
Unarmed:
|
Unarmed:
|
||||||
Enabled_For_PVP: true
|
Enabled_For_PVP: true
|
||||||
Enabled_For_PVE: true
|
Enabled_For_PVE: true
|
||||||
@@ -373,10 +385,12 @@ Double_Drops:
|
|||||||
Sandstone: true
|
Sandstone: true
|
||||||
Stone: true
|
Stone: true
|
||||||
Woodcutting:
|
Woodcutting:
|
||||||
Oak: true
|
Acacia: true
|
||||||
Birch: true
|
Birch: true
|
||||||
Spruce: true
|
Dark_Oak: true
|
||||||
|
Generic: true
|
||||||
Jungle: true
|
Jungle: true
|
||||||
|
Redwood: true
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for commands
|
# Settings for commands
|
||||||
@@ -386,6 +400,10 @@ Commands:
|
|||||||
# If true, when using partial names in commands mcMMO will try to look for a match from
|
# If true, when using partial names in commands mcMMO will try to look for a match from
|
||||||
# the offline players. Enabling this might slow the server down if there are a lot of offline players.
|
# the offline players. Enabling this might slow the server down if there are a lot of offline players.
|
||||||
Match_OfflinePlayers: false
|
Match_OfflinePlayers: false
|
||||||
|
Database:
|
||||||
|
# Database command cooldown in milliseconds, cannot be changed below the default value. (1750)
|
||||||
|
# Prevents players from spamming /mctop or /mcrank
|
||||||
|
Player_Cooldown: 1750
|
||||||
mcmmo:
|
mcmmo:
|
||||||
Donate_Message: true
|
Donate_Message: true
|
||||||
inspect:
|
inspect:
|
||||||
|
|||||||
@@ -82,7 +82,10 @@ Experience:
|
|||||||
Alchemy:
|
Alchemy:
|
||||||
Potion: 120
|
Potion: 120
|
||||||
Fishing:
|
Fishing:
|
||||||
Base: 800
|
Raw_Fish: 800
|
||||||
|
Raw_Salmon: 800
|
||||||
|
Clownfish: 800
|
||||||
|
Pufferfish: 800
|
||||||
Shake: 50
|
Shake: 50
|
||||||
Excavation:
|
Excavation:
|
||||||
Clay: 40
|
Clay: 40
|
||||||
@@ -95,27 +98,46 @@ Experience:
|
|||||||
Snow_Block: 40
|
Snow_Block: 40
|
||||||
Soul_Sand: 40
|
Soul_Sand: 40
|
||||||
Woodcutting:
|
Woodcutting:
|
||||||
Oak: 70
|
Acacia: 90
|
||||||
Spruce: 80
|
|
||||||
Birch: 90
|
Birch: 90
|
||||||
|
Dark_Oak: 90
|
||||||
|
Generic: 70
|
||||||
Jungle: 100
|
Jungle: 100
|
||||||
|
Redwood: 80
|
||||||
Huge_Mushroom_Red: 70
|
Huge_Mushroom_Red: 70
|
||||||
Huge_Mushroom_Brown: 70
|
Huge_Mushroom_Brown: 70
|
||||||
Herbalism:
|
Herbalism:
|
||||||
|
Allium: 300
|
||||||
|
Azure_Bluet: 150
|
||||||
|
Blue_Orchid: 150
|
||||||
Brown_Mushroom: 150
|
Brown_Mushroom: 150
|
||||||
Cactus: 30
|
Cactus: 30
|
||||||
Carrot: 50
|
Carrot: 50
|
||||||
Cocoa: 30
|
Cocoa: 30
|
||||||
Crops: 50
|
Crops: 50
|
||||||
|
Dead_Bush: 30
|
||||||
|
Lilac: 50
|
||||||
Melon_Block: 20
|
Melon_Block: 20
|
||||||
Nether_Warts: 50
|
Nether_Warts: 50
|
||||||
|
Orange_Tulip: 150
|
||||||
|
Oxeye_Daisy: 150
|
||||||
|
Peony: 50
|
||||||
|
Pink_Tulip: 150
|
||||||
|
Poppy: 100
|
||||||
Potato: 50
|
Potato: 50
|
||||||
Pumpkin: 20
|
Pumpkin: 20
|
||||||
Red_Mushroom: 150
|
Red_Mushroom: 150
|
||||||
Red_Rose: 100
|
Red_Tulip: 150
|
||||||
|
Rose_Bush: 50
|
||||||
|
Small_Fern: 10
|
||||||
|
Small_Grass: 10
|
||||||
Sugar_Cane_Block: 30
|
Sugar_Cane_Block: 30
|
||||||
|
Sunflower: 50
|
||||||
|
Tall_Grass: 50
|
||||||
|
Tall_Fern: 50
|
||||||
Vine: 10
|
Vine: 10
|
||||||
Water_Lily: 100
|
Water_Lily: 100
|
||||||
|
White_Tulip: 150
|
||||||
Yellow_Flower: 100
|
Yellow_Flower: 100
|
||||||
Mining:
|
Mining:
|
||||||
Coal_Ore: 100
|
Coal_Ore: 100
|
||||||
@@ -124,14 +146,17 @@ Experience:
|
|||||||
Ender_Stone: 150
|
Ender_Stone: 150
|
||||||
Glowstone: 30
|
Glowstone: 30
|
||||||
Gold_Ore: 350
|
Gold_Ore: 350
|
||||||
|
Hard_Clay: 30
|
||||||
Iron_Ore: 250
|
Iron_Ore: 250
|
||||||
Lapis_Ore: 400
|
Lapis_Ore: 400
|
||||||
Mossy_Cobblestone: 30
|
Mossy_Cobblestone: 30
|
||||||
Netherrack: 30
|
Netherrack: 30
|
||||||
Obsidian: 150
|
Obsidian: 150
|
||||||
Quartz_Ore: 250
|
Packed_Ice: 50
|
||||||
|
Quartz_Ore: 100
|
||||||
Redstone_Ore: 150
|
Redstone_Ore: 150
|
||||||
Sandstone: 30
|
Sandstone: 30
|
||||||
|
Stained_Clay: 50
|
||||||
Stone: 30
|
Stone: 30
|
||||||
Repair:
|
Repair:
|
||||||
Base: 1000.0
|
Base: 1000.0
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ Fishing.Effect.10=Ryba\u0159en\u00ed v ledu
|
|||||||
Fishing.Effect.11=Umo\u017e\u0148uje v\u00e1m ryba\u0159it v ledov\u00fdch prost\u0159ed\u00edch
|
Fishing.Effect.11=Umo\u017e\u0148uje v\u00e1m ryba\u0159it v ledov\u00fdch prost\u0159ed\u00edch
|
||||||
Fishing.Chance.Raining=[[BLUE]] De\u0161\u0165ov\u00fd bonus
|
Fishing.Chance.Raining=[[BLUE]] De\u0161\u0165ov\u00fd bonus
|
||||||
Fishing.Listener=Rybareni:
|
Fishing.Listener=Rybareni:
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Nasel si poklad!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]C\u00edt\u00edte dotek magie s t\u00edmto \u00falovkem...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]C\u00edt\u00edte dotek magie s t\u00edmto \u00falovkem...
|
||||||
Fishing.SkillName=RYBARENI
|
Fishing.SkillName=RYBARENI
|
||||||
Fishing.Skillup=[[YELLOW]]Dovednost v rybareni byla navysena o {0}. Celkem ({1})
|
Fishing.Skillup=[[YELLOW]]Dovednost v rybareni byla navysena o {0}. Celkem ({1})
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ Fishing.Effect.6=Fisherman\'s Diet
|
|||||||
Fishing.Effect.7=Improves hunger restored from fished foods
|
Fishing.Effect.7=Improves hunger restored from fished foods
|
||||||
Fishing.Chance.Raining=[[BLUE]] Rain Bonus
|
Fishing.Chance.Raining=[[BLUE]] Rain Bonus
|
||||||
Fishing.Listener=Fishing:
|
Fishing.Listener=Fishing:
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Treasure found!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
Fishing.SkillName=FISHING
|
Fishing.SkillName=FISHING
|
||||||
Fishing.Skillup=[[YELLOW]]Fishing skill increased by {0}. Total ({1})
|
Fishing.Skillup=[[YELLOW]]Fishing skill increased by {0}. Total ({1})
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ Fishing.Effect.6=Fiskers Diet
|
|||||||
Fishing.Effect.7=Forbedrer Sult genoprettet af Fisked mad
|
Fishing.Effect.7=Forbedrer Sult genoprettet af Fisked mad
|
||||||
Fishing.Chance.Raining=[[BLUE]] Regn Bonus
|
Fishing.Chance.Raining=[[BLUE]] Regn Bonus
|
||||||
Fishing.Listener=Fiskeri:
|
Fishing.Listener=Fiskeri:
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]Du har fundet en skat!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]Du f\u00f8ler et strejf a magi med denne fangst...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]Du f\u00f8ler et strejf a magi med denne fangst...
|
||||||
Fishing.SkillName=FISKER
|
Fishing.SkillName=FISKER
|
||||||
Fishing.Skillup=[[YELLOW]]Fisker evne for\u00f8get med {0}. Total ({1})
|
Fishing.Skillup=[[YELLOW]]Fisker evne for\u00f8get med {0}. Total ({1})
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ Fishing.Effect.6=Fischer-Mahlzeit
|
|||||||
Fishing.Effect.7=Verbessert Effizienz von geangelter Nahrung
|
Fishing.Effect.7=Verbessert Effizienz von geangelter Nahrung
|
||||||
Fishing.Chance.Raining=[[BLUE]] Rain Bonus
|
Fishing.Chance.Raining=[[BLUE]] Rain Bonus
|
||||||
Fishing.Listener=Angeln:
|
Fishing.Listener=Angeln:
|
||||||
Fishing.Ability.TH.ItemFound=[[AQUA]]Du hast einen Schatz gefunden!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[AQUA]]Dich ber\u00fchrt ein leichter Zauber bei diesem Fang...
|
Fishing.Ability.TH.MagicFound=[[AQUA]]Dich ber\u00fchrt ein leichter Zauber bei diesem Fang...
|
||||||
Fishing.SkillName=ANGELN
|
Fishing.SkillName=ANGELN
|
||||||
Fishing.Skillup=[[YELLOW]]Angel Skill um {0} gestiegen. Gesamt ({1})
|
Fishing.Skillup=[[YELLOW]]Angel Skill um {0} gestiegen. Gesamt ({1})
|
||||||
|
|||||||
@@ -137,7 +137,6 @@ Fishing.Effect.10=Ice Fishing
|
|||||||
Fishing.Effect.11=Allows you to fish in icy biomes
|
Fishing.Effect.11=Allows you to fish in icy biomes
|
||||||
Fishing.Chance.Raining=[[BLUE]] Rain Bonus
|
Fishing.Chance.Raining=[[BLUE]] Rain Bonus
|
||||||
Fishing.Listener=Fishing:
|
Fishing.Listener=Fishing:
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Treasure found!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
Fishing.Ability.TH.Boom=[[GRAY]]BOOM TIME!!!
|
Fishing.Ability.TH.Boom=[[GRAY]]BOOM TIME!!!
|
||||||
Fishing.Ability.TH.Poison=[[GRAY]]Something doesn't smell quite right...
|
Fishing.Ability.TH.Poison=[[GRAY]]Something doesn't smell quite right...
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ Fishing.Effect.10=Pesca de hielo
|
|||||||
Fishing.Effect.11=Te permite pescar en biomas de hielo
|
Fishing.Effect.11=Te permite pescar en biomas de hielo
|
||||||
Fishing.Chance.Raining=[[BLUE]] Lluvia de Bonus
|
Fishing.Chance.Raining=[[BLUE]] Lluvia de Bonus
|
||||||
Fishing.Listener=Pescador:
|
Fishing.Listener=Pescador:
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]\u00a1Tesoro encontrado!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]Sientes un toque de magia con esta pesca...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]Sientes un toque de magia con esta pesca...
|
||||||
Fishing.SkillName=PESCADOR
|
Fishing.SkillName=PESCADOR
|
||||||
Fishing.Skillup=[[YELLOW]]Habilidad de Pescador incrementada en {0}. Total ({1})
|
Fishing.Skillup=[[YELLOW]]Habilidad de Pescador incrementada en {0}. Total ({1})
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ Acrobatics.Listener=Akrobaatika:
|
|||||||
Acrobatics.SkillName=AKROBAATIKA
|
Acrobatics.SkillName=AKROBAATIKA
|
||||||
Acrobatics.Skillup=[[YELLOW]]Akrobaatika oskus kasvanud {0} v\u00f5rra. Kokku ({1})
|
Acrobatics.Skillup=[[YELLOW]]Akrobaatika oskus kasvanud {0} v\u00f5rra. Kokku ({1})
|
||||||
Archery.Skillup=[[YELLOW]]Vibunduse oskus kasvanud {0} v\u00f5rra. Kokku ({1})
|
Archery.Skillup=[[YELLOW]]Vibunduse oskus kasvanud {0} v\u00f5rra. Kokku ({1})
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Varandus leitud!
|
|
||||||
Mining.Ability.Lower=[[GRAY]]**TE LANGETASITE OMA KIRKA**
|
Mining.Ability.Lower=[[GRAY]]**TE LANGETASITE OMA KIRKA**
|
||||||
Mining.Ability.Ready=[[GREEN]]**TE PANITE OMA KIRKA VALMIS**
|
Mining.Ability.Ready=[[GREEN]]**TE PANITE OMA KIRKA VALMIS**
|
||||||
Mining.Listener=Kaevandamine:
|
Mining.Listener=Kaevandamine:
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ Excavation.Skills.GigaDrillBreaker.On=[[GREEN]]**TEHO PORA HAJOITUS AKTIVOITU**
|
|||||||
Excavation.Skillup=[[YELLOW]]Kaivuu taito nousi {0} tasolla. Kokonaism\u00e4\u00e4r\u00e4 ({1})
|
Excavation.Skillup=[[YELLOW]]Kaivuu taito nousi {0} tasolla. Kokonaism\u00e4\u00e4r\u00e4 ({1})
|
||||||
Fishing.Effect.0=Aarteenmets\u00e4st\u00e4j\u00e4 (Passiivinen)
|
Fishing.Effect.0=Aarteenmets\u00e4st\u00e4j\u00e4 (Passiivinen)
|
||||||
Fishing.Listener=Kalastus:
|
Fishing.Listener=Kalastus:
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Treasure found!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
Fishing.SkillName=KALASTUS
|
Fishing.SkillName=KALASTUS
|
||||||
Fishing.Skillup=[[YELLOW]]Kalastustaito nousi {0} tasolla. Kokonaism\u00e4\u00e4r\u00e4 ({1})
|
Fishing.Skillup=[[YELLOW]]Kalastustaito nousi {0} tasolla. Kokonaism\u00e4\u00e4r\u00e4 ({1})
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ Fishing.Effect.6=R\u00e9gime de fermier
|
|||||||
Fishing.Effect.7=Am\u00e9liore la nutrition des produits de la ferme
|
Fishing.Effect.7=Am\u00e9liore la nutrition des produits de la ferme
|
||||||
Fishing.Chance.Raining=[[BLUE]] Bonus de pluie
|
Fishing.Chance.Raining=[[BLUE]] Bonus de pluie
|
||||||
Fishing.Listener=P\u00eache :
|
Fishing.Listener=P\u00eache :
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Tr\u00e9sor d\u00e9couvert !
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]Vous ressentez quelque chose de magique dans cette prise...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]Vous ressentez quelque chose de magique dans cette prise...
|
||||||
Fishing.SkillName=P\u00caCHE
|
Fishing.SkillName=P\u00caCHE
|
||||||
Fishing.Skillup=[[YELLOW]]Le talent p\u00eache augmente de {0}. Total ({1})
|
Fishing.Skillup=[[YELLOW]]Le talent p\u00eache augmente de {0}. Total ({1})
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ Excavation.Skills.GigaDrillBreaker.Other.On=[[GREEN]]{0}[[DARK_GREEN]] haszn\u00
|
|||||||
Excavation.Skillup=[[YELLOW]]\u00c1s\u00e1s fejl\u0151d\u00f6tt {0} szinttel. \u00d6sszesen: ({1})
|
Excavation.Skillup=[[YELLOW]]\u00c1s\u00e1s fejl\u0151d\u00f6tt {0} szinttel. \u00d6sszesen: ({1})
|
||||||
Fishing.Effect.10=J\u00e9g Horg\u00e1szat
|
Fishing.Effect.10=J\u00e9g Horg\u00e1szat
|
||||||
Fishing.Listener=Horg\u00e1szat:
|
Fishing.Listener=Horg\u00e1szat:
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Kincs megtal\u00e1lva!
|
|
||||||
Fishing.SkillName=HORG\u00c1SZAT
|
Fishing.SkillName=HORG\u00c1SZAT
|
||||||
Herbalism.Ability.Lower=[[GRAY]]**LETETTED A KAP\u00c1DAT**
|
Herbalism.Ability.Lower=[[GRAY]]**LETETTED A KAP\u00c1DAT**
|
||||||
Herbalism.Ability.Ready=[[GREEN]]**EL\u0150K\u00c9SZ\u00cdTETTED A KAP\u00c1DAT**
|
Herbalism.Ability.Ready=[[GREEN]]**EL\u0150K\u00c9SZ\u00cdTETTED A KAP\u00c1DAT**
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ Fishing.Effect.10=\uc5bc\uc74c \ub09a\uc2dc
|
|||||||
Fishing.Effect.11=\uc5bc\uc74c\uc774 \ub36e\ud600\uc788\ub294 \ud658\uacbd\uc5d0\uc11c \ub09a\uc2dc \uac00\ub2a5
|
Fishing.Effect.11=\uc5bc\uc74c\uc774 \ub36e\ud600\uc788\ub294 \ud658\uacbd\uc5d0\uc11c \ub09a\uc2dc \uac00\ub2a5
|
||||||
Fishing.Chance.Raining=[[BLUE]] \ube44 \ubcf4\ub108\uc2a4
|
Fishing.Chance.Raining=[[BLUE]] \ube44 \ubcf4\ub108\uc2a4
|
||||||
Fishing.Listener=\ub09a\uc2dc(FISHING):
|
Fishing.Listener=\ub09a\uc2dc(FISHING):
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]\ubcf4\ubb3c \ubc1c\uacac!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]\uc774 \uc785\uc9c8\uc5d0\uc11c \ub9c8\ubc95\uc774 \ub290\uaef4\uc9d1\ub2c8\ub2e4...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]\uc774 \uc785\uc9c8\uc5d0\uc11c \ub9c8\ubc95\uc774 \ub290\uaef4\uc9d1\ub2c8\ub2e4...
|
||||||
Fishing.Ability.TH.Boom=[[GRAY]]\ud3ed\ubc1c \uc2dc\uac04!!!
|
Fishing.Ability.TH.Boom=[[GRAY]]\ud3ed\ubc1c \uc2dc\uac04!!!
|
||||||
Fishing.Ability.TH.Poison=[[GRAY]]\ubb54\uac00 \uaf64 \uad1c\ucc2e\uc740 \ub0c4\uc0c8\uac00 \ub098\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4...
|
Fishing.Ability.TH.Poison=[[GRAY]]\ubb54\uac00 \uaf64 \uad1c\ucc2e\uc740 \ub0c4\uc0c8\uac00 \ub098\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4...
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ Fishing.Effect.10=Ijs Vissen
|
|||||||
Fishing.Effect.11=Stelt je in staat om te vissen in de ijzige biomen
|
Fishing.Effect.11=Stelt je in staat om te vissen in de ijzige biomen
|
||||||
Fishing.Chance.Raining=[[BLUE]] Regen Bonus
|
Fishing.Chance.Raining=[[BLUE]] Regen Bonus
|
||||||
Fishing.Listener=Vissen:
|
Fishing.Listener=Vissen:
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Schat gevonden!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]Jij voelt een vleugje magie met deze vangst...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]Jij voelt een vleugje magie met deze vangst...
|
||||||
Fishing.SkillName=VISSEN
|
Fishing.SkillName=VISSEN
|
||||||
Herbalism.Ability.FD=[[RED]]Boeren Dieet: [[YELLOW]]Rank {0}
|
Herbalism.Ability.FD=[[RED]]Boeren Dieet: [[YELLOW]]Rank {0}
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ Fishing.Effect.10=Lodowe lowienie ryb
|
|||||||
Fishing.Effect.11=Pozwala na lowienie ryb w zimowych biomach
|
Fishing.Effect.11=Pozwala na lowienie ryb w zimowych biomach
|
||||||
Fishing.Chance.Raining=[[BLUE]] Bonus od Deszczu
|
Fishing.Chance.Raining=[[BLUE]] Bonus od Deszczu
|
||||||
Fishing.Listener=Rybactwo
|
Fishing.Listener=Rybactwo
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Treasure found!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]Wyczuwasz w pobli\u017cu \u017ar\u00f3d\u0142o magii...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]Wyczuwasz w pobli\u017cu \u017ar\u00f3d\u0142o magii...
|
||||||
Fishing.SkillName=RYBACTWO
|
Fishing.SkillName=RYBACTWO
|
||||||
Fishing.Skillup=[[YELLOW]]Umiej\u0119tno\u015b\u0107 \u0142owienia wzros\u0142a o {0}. Razem ({1})
|
Fishing.Skillup=[[YELLOW]]Umiej\u0119tno\u015b\u0107 \u0142owienia wzros\u0142a o {0}. Razem ({1})
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ Excavation.Listener=Escavacao:
|
|||||||
Excavation.SkillName=Escava\u00e7\u00e3o
|
Excavation.SkillName=Escava\u00e7\u00e3o
|
||||||
Excavation.Skillup=[[YELLOW]]Habilidade de Escavacao aumentada em {0}. Total ({1})
|
Excavation.Skillup=[[YELLOW]]Habilidade de Escavacao aumentada em {0}. Total ({1})
|
||||||
Fishing.Listener=Pescaria:
|
Fishing.Listener=Pescaria:
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Tesouro encontrado!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
Fishing.SkillName=PESCARIA
|
Fishing.SkillName=PESCARIA
|
||||||
Fishing.Skillup=[[YELLOW]]Habilidade em Pescaria aumentada em {0}. Total ({1})
|
Fishing.Skillup=[[YELLOW]]Habilidade em Pescaria aumentada em {0}. Total ({1})
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ Fishing.Effect.10=\u041f\u043e\u0434\u043b\u0435\u0434\u043d\u0430\u044f \u0420\
|
|||||||
Fishing.Effect.11=\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0440\u044b\u0431\u0430\u0447\u0438\u0442\u044c \u0432 \u0441\u043d\u0435\u0436\u043d\u044b\u0445 \u0431\u0438\u043e\u043c\u0430\u0445
|
Fishing.Effect.11=\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0440\u044b\u0431\u0430\u0447\u0438\u0442\u044c \u0432 \u0441\u043d\u0435\u0436\u043d\u044b\u0445 \u0431\u0438\u043e\u043c\u0430\u0445
|
||||||
Fishing.Chance.Raining=[[BLUE]] \u0411\u043e\u043d\u0443\u0441 \u0414\u043e\u0436\u0434\u044f
|
Fishing.Chance.Raining=[[BLUE]] \u0411\u043e\u043d\u0443\u0441 \u0414\u043e\u0436\u0434\u044f
|
||||||
Fishing.Listener=\u0420\u044b\u0431\u043e\u043b\u043e\u0432\u0441\u0442\u0432\u043e:
|
Fishing.Listener=\u0420\u044b\u0431\u043e\u043b\u043e\u0432\u0441\u0442\u0432\u043e:
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Treasure found!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
Fishing.Ability.TH.Boom=[[GRAY]]\u0412\u0420\u0415\u041c\u042f \u0412\u0417\u0420\u042b\u0412\u0410\u0422\u042c!!!
|
Fishing.Ability.TH.Boom=[[GRAY]]\u0412\u0420\u0415\u041c\u042f \u0412\u0417\u0420\u042b\u0412\u0410\u0422\u042c!!!
|
||||||
Fishing.Ability.TH.Poison=[[GRAY]]\u0427\u0442\u043e-\u0442\u043e \u0441\u0434\u0435\u0441\u044c \u043d\u0435 \u0442\u0430\u043a...
|
Fishing.Ability.TH.Poison=[[GRAY]]\u0427\u0442\u043e-\u0442\u043e \u0441\u0434\u0435\u0441\u044c \u043d\u0435 \u0442\u0430\u043a...
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ Excavation.Listener=Gr\u00e4vning:
|
|||||||
Excavation.SkillName=Gr\u00e4vning
|
Excavation.SkillName=Gr\u00e4vning
|
||||||
Excavation.Skills.GigaDrillBreaker.On=[[GREEN]]**GIGA BORR KROSSAREN AKTIVERAD**
|
Excavation.Skills.GigaDrillBreaker.On=[[GREEN]]**GIGA BORR KROSSAREN AKTIVERAD**
|
||||||
Excavation.Skillup=[[YELLOW]]Gr\u00e4vningsf\u00e4rdigheten har \u00f6kat med {0}. Totalt ({1})
|
Excavation.Skillup=[[YELLOW]]Gr\u00e4vningsf\u00e4rdigheten har \u00f6kat med {0}. Totalt ({1})
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Skatt hittad!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]] Du f\u00e5r en k\u00e4nsla av magi med denna f\u00e5ngst....
|
Fishing.Ability.TH.MagicFound=[[GRAY]] Du f\u00e5r en k\u00e4nsla av magi med denna f\u00e5ngst....
|
||||||
Herbalism.Ability.GTh=[[GREEN]]**GR\u00d6NA FINGRAR**
|
Herbalism.Ability.GTh=[[GREEN]]**GR\u00d6NA FINGRAR**
|
||||||
Herbalism.Ability.Ready=[[GREEN]]**DU H\u00d6JER DIN SKYFFEL**
|
Herbalism.Ability.Ready=[[GREEN]]**DU H\u00d6JER DIN SKYFFEL**
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ Fishing.Effect.10=Ice Fishing
|
|||||||
Fishing.Effect.11=\u0e2d\u0e19\u0e38\u0e0d\u0e32\u0e15\u0e34\u0e43\u0e2b\u0e49\u0e15\u0e01\u0e1b\u0e25\u0e32\u0e43\u0e19\u0e19\u0e49\u0e33\u0e41\u0e02\u0e47\u0e07
|
Fishing.Effect.11=\u0e2d\u0e19\u0e38\u0e0d\u0e32\u0e15\u0e34\u0e43\u0e2b\u0e49\u0e15\u0e01\u0e1b\u0e25\u0e32\u0e43\u0e19\u0e19\u0e49\u0e33\u0e41\u0e02\u0e47\u0e07
|
||||||
Fishing.Chance.Raining=[[BLUE]] Rain Bonus
|
Fishing.Chance.Raining=[[BLUE]] Rain Bonus
|
||||||
Fishing.Listener=\u0e17\u0e31\u0e01\u0e29\u0e30 Fishing:
|
Fishing.Listener=\u0e17\u0e31\u0e01\u0e29\u0e30 Fishing:
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]\u0e44\u0e14\u0e49\u0e1e\u0e1a\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34!
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]\u0e04\u0e38\u0e13\u0e23\u0e39\u0e49\u0e2a\u0e36\u0e01\u0e44\u0e14\u0e49\u0e16\u0e36\u0e07\u0e2a\u0e31\u0e21\u0e1c\u0e31\u0e2a\u0e02\u0e2d\u0e07\u0e40\u0e27\u0e17\u0e21\u0e19\u0e15\u0e23\u0e4c\u0e14\u0e49\u0e27\u0e22\u0e01\u0e32\u0e23\u0e08\u0e31\u0e1a\u0e2a\u0e34\u0e48\u0e07\u0e19\u0e35\u0e49 ...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]\u0e04\u0e38\u0e13\u0e23\u0e39\u0e49\u0e2a\u0e36\u0e01\u0e44\u0e14\u0e49\u0e16\u0e36\u0e07\u0e2a\u0e31\u0e21\u0e1c\u0e31\u0e2a\u0e02\u0e2d\u0e07\u0e40\u0e27\u0e17\u0e21\u0e19\u0e15\u0e23\u0e4c\u0e14\u0e49\u0e27\u0e22\u0e01\u0e32\u0e23\u0e08\u0e31\u0e1a\u0e2a\u0e34\u0e48\u0e07\u0e19\u0e35\u0e49 ...
|
||||||
Fishing.SkillName=FISHING
|
Fishing.SkillName=FISHING
|
||||||
Fishing.Skillup=[[YELLOW]]\u0e17\u0e31\u0e01\u0e29\u0e30 Fishing \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e02\u0e36\u0e49\u0e19 {0}. \u0e21\u0e35\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14 ({1})
|
Fishing.Skillup=[[YELLOW]]\u0e17\u0e31\u0e01\u0e29\u0e30 Fishing \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e02\u0e36\u0e49\u0e19 {0}. \u0e21\u0e35\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14 ({1})
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ Axes.Effect.2=Kritik Vuruslar
|
|||||||
Axes.SkillName=BALTALAR
|
Axes.SkillName=BALTALAR
|
||||||
Excavation.Ability.Lower=[[GRAY]]**K\u00dcREGINI INDIRIYORSUN**
|
Excavation.Ability.Lower=[[GRAY]]**K\u00dcREGINI INDIRIYORSUN**
|
||||||
Excavation.SkillName=KAZMA
|
Excavation.SkillName=KAZMA
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]Hazine bulundu!
|
|
||||||
Fishing.SkillName=BALIK TUTMA
|
Fishing.SkillName=BALIK TUTMA
|
||||||
Herbalism.Ability.Lower=[[GRAY]]**\u00c7APANI INDIRIYORSUN**
|
Herbalism.Ability.Lower=[[GRAY]]**\u00c7APANI INDIRIYORSUN**
|
||||||
Herbalism.Ability.Ready=[[GREEN]]**\u00c7APANI HAZIRLIYORSUN**
|
Herbalism.Ability.Ready=[[GREEN]]**\u00c7APANI HAZIRLIYORSUN**
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ Fishing.Effect.10=\u51b0\u9493
|
|||||||
Fishing.Effect.11=\u5141\u8bb8\u4f60\u5728\u51b0\u51b7\u7684\u73af\u5883\u4e0b\u9493\u9c7c
|
Fishing.Effect.11=\u5141\u8bb8\u4f60\u5728\u51b0\u51b7\u7684\u73af\u5883\u4e0b\u9493\u9c7c
|
||||||
Fishing.Chance.Raining=[[BLUE]] \u5927\u91cf\u5956\u52b1
|
Fishing.Chance.Raining=[[BLUE]] \u5927\u91cf\u5956\u52b1
|
||||||
Fishing.Listener=\u9493\u9c7c(Fishing):
|
Fishing.Listener=\u9493\u9c7c(Fishing):
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]\u53d1\u73b0\u5b9d\u7269\u4e86\uff01
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]\u4f60\u611f\u5230\u4e00\u80a1\u9b54\u529b\u7684\u6ce2\u52a8...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]\u4f60\u611f\u5230\u4e00\u80a1\u9b54\u529b\u7684\u6ce2\u52a8...
|
||||||
Fishing.Ability.TH.Boom=[[GRAY]]\u7e41\u8363\u65f6\u671f!!!
|
Fishing.Ability.TH.Boom=[[GRAY]]\u7e41\u8363\u65f6\u671f!!!
|
||||||
Fishing.Ability.TH.Poison=[[GRAY]]\u4ec0\u4e48\u4e1c\u897f,\u95fb\u8d77\u6765\u597d\u81ed\u554a...
|
Fishing.Ability.TH.Poison=[[GRAY]]\u4ec0\u4e48\u4e1c\u897f,\u95fb\u8d77\u6765\u597d\u81ed\u554a...
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ Fishing.Effect.10=\u51b0\u91e3
|
|||||||
Fishing.Effect.11=\u5141\u8a31\u4f60\u5728\u51b0\u5929\u96ea\u5730\u88e1\u91e3\u9b5a
|
Fishing.Effect.11=\u5141\u8a31\u4f60\u5728\u51b0\u5929\u96ea\u5730\u88e1\u91e3\u9b5a
|
||||||
Fishing.Chance.Raining=[[BLUE]] \u5927\u91cf\u734e\u52f5
|
Fishing.Chance.Raining=[[BLUE]] \u5927\u91cf\u734e\u52f5
|
||||||
Fishing.Listener=\u91e3\u9b5a:
|
Fishing.Listener=\u91e3\u9b5a:
|
||||||
Fishing.Ability.TH.ItemFound=[[GRAY]]\u767c\u73fe\u5bf6\u7269\u4e86\uff01
|
|
||||||
Fishing.Ability.TH.MagicFound=[[GRAY]]\u4f60\u611f\u53d7\u5230\u9b54\u529b\u7684\u6ce2\u52d5...
|
Fishing.Ability.TH.MagicFound=[[GRAY]]\u4f60\u611f\u53d7\u5230\u9b54\u529b\u7684\u6ce2\u52d5...
|
||||||
Fishing.Ability.TH.Boom=[[GRAY]]\u6536\u7a6b\u6642\u9593!!!
|
Fishing.Ability.TH.Boom=[[GRAY]]\u6536\u7a6b\u6642\u9593!!!
|
||||||
Fishing.Ability.TH.Poison=[[GRAY]]\u4ec0\u9ebc\u6771\u897f,\u805e\u8d77\u4f86\u597d\u81ed\u554a...
|
Fishing.Ability.TH.Poison=[[GRAY]]\u4ec0\u9ebc\u6771\u897f,\u805e\u8d77\u4f86\u597d\u81ed\u554a...
|
||||||
|
|||||||
@@ -114,6 +114,9 @@ commands:
|
|||||||
kraken:
|
kraken:
|
||||||
aliases: [mckraken]
|
aliases: [mckraken]
|
||||||
description: Unleash the kraken!
|
description: Unleash the kraken!
|
||||||
|
mcfools:
|
||||||
|
aliases: [macho, jumping, throwing, wrecking, crafting, walking, swimming, falling, climbing, flying, diving, piggy]
|
||||||
|
description: Deploy jokes
|
||||||
permissions:
|
permissions:
|
||||||
mcmmo.*:
|
mcmmo.*:
|
||||||
default: false
|
default: false
|
||||||
@@ -602,16 +605,6 @@ permissions:
|
|||||||
mcmmo.bypass.fishingtraps:
|
mcmmo.bypass.fishingtraps:
|
||||||
default: false
|
default: false
|
||||||
description: Allows user to bypass finding traps when Fishing
|
description: Allows user to bypass finding traps when Fishing
|
||||||
mcmmo.bypass.inspect.distance:
|
|
||||||
default: false
|
|
||||||
description: Allows user to bypass Inspect's distance requirements
|
|
||||||
children:
|
|
||||||
mcmmo.commands.inspect.far: true
|
|
||||||
mcmmo.bypass.inspect.offline:
|
|
||||||
default: false
|
|
||||||
description: Allows user to bypass Inspect's offline player requirements
|
|
||||||
children:
|
|
||||||
mcmmo.commands.inspect.offline: true
|
|
||||||
mcmmo.chat.*:
|
mcmmo.chat.*:
|
||||||
default: false
|
default: false
|
||||||
description: Implies all mcmmo.chat permissions. (Warning, contains adminchat)
|
description: Implies all mcmmo.chat permissions. (Warning, contains adminchat)
|
||||||
@@ -698,11 +691,6 @@ permissions:
|
|||||||
mcmmo.commands.skillreset.all: true
|
mcmmo.commands.skillreset.all: true
|
||||||
mcmmo.commands.vampirism.all: true
|
mcmmo.commands.vampirism.all: true
|
||||||
mcmmo.commands.xprate.all: true
|
mcmmo.commands.xprate.all: true
|
||||||
mcmmo.commands.ability:
|
|
||||||
default: false
|
|
||||||
description: Allows access to the mcability command
|
|
||||||
children:
|
|
||||||
mcmmo.commands.mcability: true
|
|
||||||
mcmmo.commands.acrobatics:
|
mcmmo.commands.acrobatics:
|
||||||
description: Allows access to the acrobatics command
|
description: Allows access to the acrobatics command
|
||||||
mcmmo.commands.addlevels:
|
mcmmo.commands.addlevels:
|
||||||
@@ -771,11 +759,6 @@ permissions:
|
|||||||
description: Allows access to the mcability command
|
description: Allows access to the mcability command
|
||||||
mcmmo.commands.mcability.others:
|
mcmmo.commands.mcability.others:
|
||||||
description: Allows access to the mcability command for other players
|
description: Allows access to the mcability command for other players
|
||||||
mcmmo.commands.mcc:
|
|
||||||
default: false
|
|
||||||
description: Allows access to the mcmmo help command
|
|
||||||
children:
|
|
||||||
mcmmo.commands.mcmmo.help: true
|
|
||||||
mcmmo.commands.mcconvert.*:
|
mcmmo.commands.mcconvert.*:
|
||||||
default: false
|
default: false
|
||||||
description: Allows access to the mcconvert commands
|
description: Allows access to the mcconvert commands
|
||||||
@@ -902,11 +885,6 @@ permissions:
|
|||||||
description: Allows access to the mmoedit command
|
description: Allows access to the mmoedit command
|
||||||
mcmmo.commands.mmoedit.others:
|
mcmmo.commands.mmoedit.others:
|
||||||
description: Allows access to the mmoedit command for other players
|
description: Allows access to the mmoedit command for other players
|
||||||
mcmmo.commands.mmoupdate:
|
|
||||||
default: false
|
|
||||||
description: Allows access to the mcconvert database command
|
|
||||||
children:
|
|
||||||
mcmmo.commands.mcconvert.database: true
|
|
||||||
mcmmo.commands.mmoshowdb:
|
mcmmo.commands.mmoshowdb:
|
||||||
description: Allows access to the mmoshowdb command
|
description: Allows access to the mmoshowdb command
|
||||||
mcmmo.commands.mobhealth:
|
mcmmo.commands.mobhealth:
|
||||||
@@ -1184,7 +1162,7 @@ permissions:
|
|||||||
mcmmo.chat.adminchat: true
|
mcmmo.chat.adminchat: true
|
||||||
mcmmo.commands.defaultsop: true
|
mcmmo.commands.defaultsop: true
|
||||||
mcmmo.item.all: true
|
mcmmo.item.all: true
|
||||||
mcmmo.tools.updatecheck: true
|
mcmmo.tools.all: true
|
||||||
mcmmo.item.*:
|
mcmmo.item.*:
|
||||||
default: false
|
default: false
|
||||||
description: Implies all mcmmo.item permissions
|
description: Implies all mcmmo.item permissions
|
||||||
@@ -1949,163 +1927,7 @@ permissions:
|
|||||||
default: false
|
default: false
|
||||||
description: Implies all mcmmo.tools permissions.
|
description: Implies all mcmmo.tools permissions.
|
||||||
children:
|
children:
|
||||||
mcmmo.tools.mcgod: true
|
|
||||||
mcmmo.tools.mcrefresh: true
|
|
||||||
mcmmo.tools.mcremove: true
|
|
||||||
mcmmo.tools.mmoedit: true
|
|
||||||
mcmmo.tools.updatecheck: true
|
mcmmo.tools.updatecheck: true
|
||||||
mcmmo.tools.mcgod:
|
|
||||||
default: false
|
|
||||||
description: Allows access to mcgod command
|
|
||||||
children:
|
|
||||||
mcmmo.commands.mcgod: true
|
|
||||||
mcmmo.tools.mcrefresh:
|
|
||||||
default: false
|
|
||||||
description: Allows access to mcrefresh command
|
|
||||||
children:
|
|
||||||
mcmmo.commands.mcrefresh: true
|
|
||||||
mcmmo.commands.mcrefresh.others: true
|
|
||||||
mcmmo.tools.mcremove:
|
|
||||||
default: false
|
|
||||||
decription: Allows access to mcremove and mcpurge command
|
|
||||||
children:
|
|
||||||
mcmmo.commands.mcremove: true
|
|
||||||
mcmmo.tools.mmoedit:
|
|
||||||
default: false
|
|
||||||
description: Allows access to mmoedit command
|
|
||||||
children:
|
|
||||||
mcmmo.commands.addlevels: true
|
|
||||||
mcmmo.commands.addlevels.others: true
|
|
||||||
mcmmo.commands.addxp: true
|
|
||||||
mcmmo.commands.addxp.others: true
|
|
||||||
mcmmo.commands.mcpurge: true
|
|
||||||
mcmmo.commands.mmoedit: true
|
|
||||||
mcmmo.commands.mmoedit.others: true
|
|
||||||
mcmmo.tools.updatecheck:
|
mcmmo.tools.updatecheck:
|
||||||
default: false
|
default: false
|
||||||
description: Notifies admins if there is a new version of mcMMO available
|
description: Notifies admins if there is a new version of mcMMO available
|
||||||
mcmmo.ability.fishing.shakemob:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.fishing.shake: true
|
|
||||||
mcmmo.ability.axes.impact:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.axes.armorimpact: true
|
|
||||||
mcmmo.ability.taming.fastfoodservice:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.taming.fastfood: true
|
|
||||||
mcmmo.ability.archery.trackarrows:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.archery.retrieve: true
|
|
||||||
mcmmo.ability.repair.repairbonus:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.repair.superrepair: true
|
|
||||||
mcmmo.ability.swords.counterattack:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.swords.counter: true
|
|
||||||
mcmmo.ability.archery.bonusdamage:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.archery.skillshot: true
|
|
||||||
mcmmo.ability.excavation.treasures:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.excavation.treasurehunter: true
|
|
||||||
mcmmo.ability.fishing.treasures:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.fishing.treasurehunter: true
|
|
||||||
mcmmo.ability.fishing.magic:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.fishing.magichunter: true
|
|
||||||
mcmmo.ability.unarmed.bonusdamage:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.unarmed.ironarm: true
|
|
||||||
mcmmo.ability.axes.bonusdamage:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.axes.axemastery: true
|
|
||||||
mcmmo.ability.smelting.doubledrops:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.smelting.secondsmelt: true
|
|
||||||
mcmmo.ability.taming.callofthewild_renamepets:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.taming.callofthewild.renamepets: true
|
|
||||||
mcmmo.ability.blastmining.*:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.mining.blastmining.*: true
|
|
||||||
mcmmo.ability.blastmining.all:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.mining.blastmining.all: true
|
|
||||||
mcmmo.ability.blastmining.biggerbombs:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.mining.blastmining.biggerbombs: true
|
|
||||||
mcmmo.ability.blastmining.demolitionsexpertise:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.mining.blastmining.demolitionsexpertise: true
|
|
||||||
mcmmo.ability.blastmining.detonate:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.mining.blastmining.detonate: true
|
|
||||||
mcmmo.ability.herbalism.greenthumbblocks:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.herbalism.greenthumb.blocks.all: true
|
|
||||||
mcmmo.ability.herbalism.greenthumbcarrots:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.herbalism.greenthumb.plants.carrot: true
|
|
||||||
mcmmo.ability.herbalism.greenthumbcocoa:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.herbalism.greenthumb.plants.cocoa: true
|
|
||||||
mcmmo.ability.herbalism.greenthumbnetherwart:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.herbalism.greenthumb.plants.netherwarts: true
|
|
||||||
mcmmo.ability.herbalism.greenthumbpotatoes:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.herbalism.greenthumb.plants.potato: true
|
|
||||||
mcmmo.ability.herbalism.greenthumbwheat:
|
|
||||||
default: false
|
|
||||||
description: deprecated
|
|
||||||
children:
|
|
||||||
mcmmo.ability.herbalism.greenthumb.plants.crops: true
|
|
||||||
|
|||||||
@@ -446,7 +446,7 @@ Excavation:
|
|||||||
XP: 3000
|
XP: 3000
|
||||||
Drop_Chance: 0.05
|
Drop_Chance: 0.05
|
||||||
Drop_Level: 750
|
Drop_Level: 750
|
||||||
Drops_From: [Dirt, Grass, Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
Drops_From: [Dirt, Podzol, Grass, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
||||||
SULPHUR:
|
SULPHUR:
|
||||||
Amount: 1
|
Amount: 1
|
||||||
XP: 30
|
XP: 30
|
||||||
@@ -488,13 +488,13 @@ Excavation:
|
|||||||
XP: 80
|
XP: 80
|
||||||
Drop_Chance: 0.5
|
Drop_Chance: 0.5
|
||||||
Drop_Level: 500
|
Drop_Level: 500
|
||||||
Drops_From: [Dirt, Grass, Mycelium]
|
Drops_From: [Dirt, Podzol, Grass, Mycelium]
|
||||||
BROWN_MUSHROOM:
|
BROWN_MUSHROOM:
|
||||||
Amount: 1
|
Amount: 1
|
||||||
XP: 80
|
XP: 80
|
||||||
Drop_Chance: 0.5
|
Drop_Chance: 0.5
|
||||||
Drop_Level: 500
|
Drop_Level: 500
|
||||||
Drops_From: [Dirt, Grass, Mycelium]
|
Drops_From: [Dirt, Podzol, Grass, Mycelium]
|
||||||
EGG:
|
EGG:
|
||||||
Amount: 1
|
Amount: 1
|
||||||
XP: 100
|
XP: 100
|
||||||
@@ -506,7 +506,7 @@ Excavation:
|
|||||||
XP: 80
|
XP: 80
|
||||||
Drop_Chance: 0.5
|
Drop_Chance: 0.5
|
||||||
Drop_Level: 650
|
Drop_Level: 650
|
||||||
Drops_From: [Sand]
|
Drops_From: [Sand, Red_Sand]
|
||||||
WATCH:
|
WATCH:
|
||||||
Amount: 1
|
Amount: 1
|
||||||
XP: 100
|
XP: 100
|
||||||
@@ -530,43 +530,43 @@ Excavation:
|
|||||||
XP: 80
|
XP: 80
|
||||||
Drop_Chance: 5.0
|
Drop_Chance: 5.0
|
||||||
Drop_Level: 25
|
Drop_Level: 25
|
||||||
Drops_From: [Dirt, Grass, Sand, Mycelium]
|
Drops_From: [Dirt, Podzol, Grass, Sand, Red_Sand, Mycelium]
|
||||||
GOLD_RECORD:
|
GOLD_RECORD:
|
||||||
Amount: 1
|
Amount: 1
|
||||||
XP: 3000
|
XP: 3000
|
||||||
Drop_Chance: 0.05
|
Drop_Chance: 0.05
|
||||||
Drop_Level: 250
|
Drop_Level: 250
|
||||||
Drops_From: [Dirt, Grass, Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
Drops_From: [Dirt, Podzol, Grass, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
||||||
GREEN_RECORD:
|
GREEN_RECORD:
|
||||||
Amount: 1
|
Amount: 1
|
||||||
XP: 3000
|
XP: 3000
|
||||||
Drop_Chance: 0.05
|
Drop_Chance: 0.05
|
||||||
Drop_Level: 250
|
Drop_Level: 250
|
||||||
Drops_From: [Dirt, Grass, Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
Drops_From: [Dirt, Podzol, Grass, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
||||||
DIAMOND:
|
DIAMOND:
|
||||||
Amount: 1
|
Amount: 1
|
||||||
XP: 1000
|
XP: 1000
|
||||||
Drop_Chance: 0.13
|
Drop_Chance: 0.13
|
||||||
Drop_Level: 350
|
Drop_Level: 350
|
||||||
Drops_From: [Dirt, Grass, Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
Drops_From: [Dirt, Podzol, Grass, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
||||||
INK_SACK_BROWN:
|
INK_SACK_BROWN:
|
||||||
Amount: 1
|
Amount: 1
|
||||||
XP: 100
|
XP: 100
|
||||||
Drop_Chance: 1.33
|
Drop_Chance: 1.33
|
||||||
Drop_Level: 350
|
Drop_Level: 350
|
||||||
Drops_From: [Dirt, Grass, Mycelium]
|
Drops_From: [Dirt, Podzol, Grass, Mycelium]
|
||||||
QUARTZ:
|
QUARTZ:
|
||||||
Amount: 1
|
Amount: 1
|
||||||
XP: 100
|
XP: 100
|
||||||
Drop_Chance: 0.5
|
Drop_Chance: 0.5
|
||||||
Drop_Level: 850
|
Drop_Level: 850
|
||||||
Drops_From: [Dirt, Sand, Gravel, Mycelium, Soul_Sand]
|
Drops_From: [Dirt, Podzol, Sand, Red_Sand, Gravel, Mycelium, Soul_Sand]
|
||||||
NAME_TAG:
|
NAME_TAG:
|
||||||
Amount: 1
|
Amount: 1
|
||||||
XP: 3000
|
XP: 3000
|
||||||
Drop_Chance: 0.05
|
Drop_Chance: 0.05
|
||||||
Drop_Level: 250
|
Drop_Level: 250
|
||||||
Drops_From: [Dirt, Grass, Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
Drops_From: [Dirt, Podzol, Grass, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
||||||
#
|
#
|
||||||
# Settings for Hylian Luck
|
# Settings for Hylian Luck
|
||||||
###
|
###
|
||||||
|
|||||||
Reference in New Issue
Block a user