Merge branches 'tridentsxbows' and 'master' of github.com:mcMMO-Dev/mcMMO into tridentsxbows

This commit is contained in:
nossr50 2021-04-07 16:21:02 -07:00
commit 29ee91ddfc
34 changed files with 2803 additions and 1849 deletions

View File

@ -103,6 +103,88 @@ Version 2.2.000
Parties got unnecessarily complex in my absence, I have removed many party features in order to simplify parties and bring them closer to my vision. I have also added new features which should improve parties where it matters. Parties got unnecessarily complex in my absence, I have removed many party features in order to simplify parties and bring them closer to my vision. I have also added new features which should improve parties where it matters.
About the removed party features, all the features I removed I consider poor quality features and I don't think they belong in mcMMO. Feel free to yell at me in discord if you disagree. About the removed party features, all the features I removed I consider poor quality features and I don't think they belong in mcMMO. Feel free to yell at me in discord if you disagree.
I don't know what genius decided to make parties public by default, when I found out that parties had been changed to such a system I could barely contain my disgust. Parties are back to being private, you get invited by a party leader or party officer. That is the only way to join a party. I don't know what genius decided to make parties public by default, when I found out that parties had been changed to such a system I could barely contain my disgust. Parties are back to being private, you get invited by a party leader or party officer. That is the only way to join a party.
Version 2.1.189
Removed UP warning
Updated pl locale (Thanks Mich3l3k)
NOTES:
Ultra Permissions is SAFE to use with mcMMO
After getting in contact with the UltraPermissions devs and exhaustive testing, I have concluded that using UltraPermissions is completely safe with mcMMO. The users who had an issue with performance currently have an unknown cause, potentially it is from a plugin using the UltraPermissions API I really can't say without more data. My apologies to the UltraPermissions team for reporting an issue between our two plugins directly, as that is not the case. I would have tested it myself sooner but UltraPermissions was closed source and premium so I wasn't particularly motivated to do so, however I have been given access to the binaries so now I can do all the testing I want if future issues ever arise which I have zero expectations that they will.
UltraPermissions is as efficient as LuckPerms
I have done a lot of profiling of UltraPermissions via Spark in the last few hours, I also compared it to LuckPerms. I wasn't expecting it, but UltraPermissions runs just as fast as LuckPerms if not faster. So it has no performance issues whatsoever from my point of view.
Use whatever permission plugin you like, there will be no difference between using LuckPerms or UltraPermissions with mcMMO.
If you had issues with UltraPermissions please contact the UP devs
If you experience lag with mcMMO and UltraPermissions, we are trying to determine the culprit. It is likely the culprit is from another plugin doing bad things with the UltraPermissions API. Please get in contact with the UltraPermission devs if you run into issues ( @MATRIX | Timo K. & @Liz3 ). Neither I nor they can replicate it so we need you guys to provide more data.
Version 2.1.188
Updated default entries in treasures.yml to use "Level_Requirement" instead of "Drop_Level"
Fixed a bug where excavation treasures only required level 0 instead of loading the value from the config
Fixed a bug where /fishing was showing the wrong shake chance
Default Shake chance increased from 15% to 30% (update advanced.yml manually or delete the file to regenerate it and receive these changes)
Removed entries for ranks 2-8 of Shake from advanced.yml (Shake only has one rank, the extra entries were a mistake)
Modified the warning about UltraPermissions
Removed the debug message about potentially unused keys (only shown if you had debug mode enabled in config.yml)
NOTES:
This update makes changes to treasures.yml automatically to apply the fix, you don't need to do anything
UltraPermissions devs are working on a fix for the performance issue bug
Version 2.1.187
Fixed a ClassCastException error involving Rupture
Version 2.1.186
Rupture has been reworked to solve a few outstanding issues (see notes)
Fixed an exploit involving enchantments (thanks TheBusyBiscuit)
Fixed a very small memory leak that would only happen in very rare situations
Fixed a bug where XP wasn't granted while sneaking and interacting with a berry bush
Gore no longer applies Rupture
Gore no longer sends a message to the Wolf owner when it triggers
Gore no longer sends a message to players that are hit by it
Rupture no longer sends a message telling you that your target is bleeding
Updated locale string 'Swords.SubSkill.Rupture.Description'
Updated locale string 'Swords.SubSkill.Rupture.Stat.Extra'
Updated locale string 'Swords.Combat.Rupture.Note'
Added locale string 'Swords.SubSkill.Rupture.Stat.TickDamage'
Added locale string 'Swords.SubSkill.Rupture.Stat.ExplosionDamage'
Added 'Skills.Swords.Rupture.Rupture_Mechanics.Chance_To_Apply_On_Hit' to advanced.yml
Added 'Skills.Swords.Rupture.Rupture_Mechanics.Duration_In_Seconds.Against_Players' to advanced.yml
Added 'Skills.Swords.Rupture.Rupture_Mechanics.Duration_In_Seconds.Against_Mobs' to advanced.yml
Added 'Skills.Swords.Rupture.Rupture_Mechanics.Tick_Interval_Damage.Against_Players' to advanced.yml
Added 'Skills.Swords.Rupture.Rupture_Mechanics.Tick_Interval_Damage.Against_Mobs' to advanced.yml
Added 'Skills.Swords.Rupture.Rupture_Mechanics.Explosion_Damage.Against_Players' to advanced.yml
Added 'Skills.Swords.Rupture.Rupture_Mechanics.Explosion_Damage.Against_Mobs' to advanced.yml
Removed 'Skills.Swords.Rupture.ChanceMax' from advanced.yml
Removed 'Skills.Swords.Rupture.MaxBonusLevel.Standard' from advanced.yml
Removed 'Skills.Swords.Rupture.MaxBonusLevel.RetroMode' from advanced.yml
Removed 'Skills.Swords.Rupture.MaxTicks' from advanced.yml
Removed 'Skills.Swords.Rupture.BaseTicks' from advanced.yml
Removed 'Skills.Swords.Rupture.DamagePlayer' from advanced.yml
Removed 'Skills.Swords.Rupture.DamageMobs' from advanced.yml
NOTES:
The old Rupture would constantly interfere with your ability to do a Sweep Attack/Swipe with swords, the new one solves this problem
Targets will bleed and take "pure" damage while bleeding, this never kills the target. It will reduce them to 0.01 HP.
After 5 seconds of not applying Rupture on the target Rupture explodes dealing a large amount of damage, this damage is not pure and is affected by armor etc.
Rupture no longer tells you that you that you applied it to the target, it should be obvious from the sounds/particle effects
The new Rupture no longer constantly interferes with the vanilla Swipe (the AOE attack built into Minecraft)
The new Rupture has not had a fine tuned balance pass, I will be balancing it frequently after this patch, it may be too weak or too strong in its current form
Rupture does not stack between players, whoever applied Rupture first determines its strength, this will change in the future (Stronger Ruptures will overwrite weaker ones)
When you reapply rupture it immediately triggers a damage tick
Version 2.1.185
Fixed an exploit for Herbalism
Version 2.1.184
Removed April Fools event
Fixed a bug where the default treasures.yml file had incorrect keys (see notes)
NOTES:
mcMMO will fix bad config files automatically, you don't need to do anything
Version 2.1.183 Version 2.1.183
Players now gain Acrobatics XP from falling even if they don't have the Roll permission node (checks for Acrobatics skill permission) Players now gain Acrobatics XP from falling even if they don't have the Roll permission node (checks for Acrobatics skill permission)
treasures.yml now has separate settings for Drop_Level for Standard/Retro mode (see notes / this change is automatic) treasures.yml now has separate settings for Drop_Level for Standard/Retro mode (see notes / this change is automatic)

View File

@ -1,88 +1,94 @@
//package com.gmail.nossr50.api; package com.gmail.nossr50.api;
//
//import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.player.McMMOPlayer;
//import com.gmail.nossr50.datatypes.skills.SuperAbilityType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
//import com.gmail.nossr50.runnables.skills.BleedTimerTask; import com.gmail.nossr50.mcMMO;
//import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
//import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
//import org.bukkit.entity.Player; import org.bukkit.entity.Player;
//
//public final class AbilityAPI { public final class AbilityAPI {
// private AbilityAPI() {} private AbilityAPI() {}
//
// public static boolean berserkEnabled(Player player) { public static boolean berserkEnabled(Player player) {
// return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.BERSERK); return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.BERSERK);
// } }
//
// public static boolean gigaDrillBreakerEnabled(Player player) { public static boolean gigaDrillBreakerEnabled(Player player) {
// return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.GIGA_DRILL_BREAKER); return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.GIGA_DRILL_BREAKER);
// } }
//
// public static boolean greenTerraEnabled(Player player) { public static boolean greenTerraEnabled(Player player) {
// return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.GREEN_TERRA); return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.GREEN_TERRA);
// } }
//
// public static boolean serratedStrikesEnabled(Player player) { public static boolean serratedStrikesEnabled(Player player) {
// return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.SERRATED_STRIKES); return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.SERRATED_STRIKES);
// } }
//
// public static boolean skullSplitterEnabled(Player player) { public static boolean skullSplitterEnabled(Player player) {
// return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.SKULL_SPLITTER); return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.SKULL_SPLITTER);
// } }
//
// public static boolean superBreakerEnabled(Player player) { public static boolean superBreakerEnabled(Player player) {
// return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.SUPER_BREAKER); return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.SUPER_BREAKER);
// } }
//
// public static boolean treeFellerEnabled(Player player) { public static boolean treeFellerEnabled(Player player) {
// return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.TREE_FELLER); return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.TREE_FELLER);
// } }
//
// public static boolean isAnyAbilityEnabled(Player player) { public static boolean isAnyAbilityEnabled(Player player) {
// McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
//
// for (SuperAbilityType ability : SuperAbilityType.values()) { for (SuperAbilityType ability : SuperAbilityType.values()) {
// if (mcMMOPlayer.getAbilityMode(ability)) { if (mcMMOPlayer.getAbilityMode(ability)) {
// return true; return true;
// } }
// } }
//
// return false; return false;
// } }
//
// public static void resetCooldowns(Player player) { public static void resetCooldowns(Player player) {
// UserManager.getPlayer(player).resetCooldowns(); UserManager.getPlayer(player).resetCooldowns();
// } }
//
// public static void setBerserkCooldown(Player player, long cooldown) { public static void setBerserkCooldown(Player player, long cooldown) {
// UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.BERSERK, cooldown); UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.BERSERK, cooldown);
// } }
//
// public static void setGigaDrillBreakerCooldown(Player player, long cooldown) { public static void setGigaDrillBreakerCooldown(Player player, long cooldown) {
// UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.GIGA_DRILL_BREAKER, cooldown); UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.GIGA_DRILL_BREAKER, cooldown);
// } }
//
// public static void setGreenTerraCooldown(Player player, long cooldown) { public static void setGreenTerraCooldown(Player player, long cooldown) {
// UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.GREEN_TERRA, cooldown); UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.GREEN_TERRA, cooldown);
// } }
//
// public static void setSerratedStrikesCooldown(Player player, long cooldown) { public static void setSerratedStrikesCooldown(Player player, long cooldown) {
// UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.SERRATED_STRIKES, cooldown); UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.SERRATED_STRIKES, cooldown);
// } }
//
// public static void setSkullSplitterCooldown(Player player, long cooldown) { public static void setSkullSplitterCooldown(Player player, long cooldown) {
// UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.SKULL_SPLITTER, cooldown); UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.SKULL_SPLITTER, cooldown);
// } }
//
// public static void setSuperBreakerCooldown(Player player, long cooldown) { public static void setSuperBreakerCooldown(Player player, long cooldown) {
// UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.SUPER_BREAKER, cooldown); UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.SUPER_BREAKER, cooldown);
// } }
//
// public static void setTreeFellerCooldown(Player player, long cooldown) { public static void setTreeFellerCooldown(Player player, long cooldown) {
// UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.TREE_FELLER, cooldown); UserManager.getPlayer(player).setAbilityDATS(SuperAbilityType.TREE_FELLER, cooldown);
// } }
//
// public static boolean isBleeding(LivingEntity entity) { public static boolean isBleeding(LivingEntity entity) {
// return BleedTimerTask.isBleeding(entity); if(entity.isValid()) {
// } if(entity.hasMetadata(mcMMO.RUPTURE_META_KEY)) {
//} return true;
}
}
return false;
}
}

View File

@ -34,7 +34,7 @@ public class McmmoCommand implements CommandExecutor {
sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion())); sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion()));
} }
mcMMO.getHolidayManager().anniversaryCheck(sender); // mcMMO.getHolidayManager().anniversaryCheck(sender);
return true; return true;
case 1: case 1:

View File

@ -1,199 +1,199 @@
package com.gmail.nossr50.commands.skills; //package com.gmail.nossr50.commands.skills;
//
import com.gmail.nossr50.locale.LocaleLoader; //import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.HolidayManager.FakeSkillType; //import com.gmail.nossr50.util.HolidayManager.FakeSkillType;
import com.gmail.nossr50.util.Misc; //import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.commands.CommandUtils; //import com.gmail.nossr50.util.commands.CommandUtils;
import com.gmail.nossr50.util.text.StringUtils; //import com.gmail.nossr50.util.text.StringUtils;
import com.google.common.collect.ImmutableList; //import com.google.common.collect.ImmutableList;
import org.bukkit.command.Command; //import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; //import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor; //import org.bukkit.command.TabExecutor;
import org.bukkit.entity.Player; //import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull; //import org.jetbrains.annotations.NotNull;
//
import java.text.DecimalFormat; //import java.text.DecimalFormat;
import java.util.ArrayList; //import java.util.ArrayList;
import java.util.List; //import java.util.List;
//
public class AprilCommand implements TabExecutor { //public class AprilCommand implements TabExecutor {
private String skillName; // private String skillName;
//
protected DecimalFormat percent = new DecimalFormat("##0.00%"); // protected DecimalFormat percent = new DecimalFormat("##0.00%");
protected DecimalFormat decimal = new DecimalFormat("##0.00"); // protected DecimalFormat decimal = new DecimalFormat("##0.00");
//
@Override // @Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) { // public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
if (CommandUtils.noConsoleUsage(sender)) { // if (CommandUtils.noConsoleUsage(sender)) {
return true; // return true;
} // }
//
skillName = StringUtils.getCapitalized(label); // skillName = StringUtils.getCapitalized(label);
//
if (args.length == 0) { // if (args.length == 0) {
Player player = (Player) sender; // Player player = (Player) sender;
FakeSkillType fakeSkillType = FakeSkillType.getByName(skillName); // FakeSkillType fakeSkillType = FakeSkillType.getByName(skillName);
//
float skillValue = Misc.getRandom().nextInt(99); // float skillValue = Misc.getRandom().nextInt(99);
//
player.sendMessage(LocaleLoader.getString("Skills.Header", skillName)); // player.sendMessage(LocaleLoader.getString("Skills.Header", skillName));
player.sendMessage(LocaleLoader.getString("Commands.XPGain", getXPGainString(fakeSkillType))); // 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))); // player.sendMessage(LocaleLoader.getString("Effects.Level", (int) skillValue, Misc.getRandom().nextInt(1000), 1000 + Misc.getRandom().nextInt(1000)));
//
//
List<String> effectMessages = effectsDisplay(fakeSkillType); // List<String> effectMessages = effectsDisplay(fakeSkillType);
//
if (!effectMessages.isEmpty()) { // if (!effectMessages.isEmpty()) {
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Effects.Effects"))); // player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Effects.Effects")));
//
for (String message : effectMessages) { // for (String message : effectMessages) {
player.sendMessage(message); // player.sendMessage(message);
} // }
} // }
//
List<String> statsMessages = statsDisplay(fakeSkillType); // List<String> statsMessages = statsDisplay(fakeSkillType);
//
if (!statsMessages.isEmpty()) { // if (!statsMessages.isEmpty()) {
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Commands.Stats.Self"))); // player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Commands.Stats.Self")));
//
for (String message : statsMessages) { // for (String message : statsMessages) {
player.sendMessage(message); // player.sendMessage(message);
} // }
} // }
//
player.sendMessage(LocaleLoader.formatString("[[DARK_AQUA]]Guide for {0} available - type /APRIL FOOLS ! :D", skillName)); // player.sendMessage(LocaleLoader.formatString("[[DARK_AQUA]]Guide for {0} available - type /APRIL FOOLS ! :D", skillName));
return true; // return true;
} // }
return true; // return true;
} // }
//
private String getXPGainString(FakeSkillType fakeSkillType) { // private String getXPGainString(FakeSkillType fakeSkillType) {
switch (fakeSkillType) { // switch (fakeSkillType) {
case MACHO: // case MACHO:
return "Get beaten up"; // return "Get beaten up";
case JUMPING: // case JUMPING:
return "Kris Kross will make ya Jump Jump"; // return "Kris Kross will make ya Jump Jump";
case THROWING: // case THROWING:
return "Chuck your items on the floor"; // return "Chuck your items on the floor";
case WRECKING: // case WRECKING:
return "I'M GONNA WRECK IT!"; // return "I'M GONNA WRECK IT!";
case CRAFTING: // case CRAFTING:
return "Craft apple pies"; // return "Craft apple pies";
case WALKING: // case WALKING:
return "Walk around the park"; // return "Walk around the park";
case SWIMMING: // case SWIMMING:
return "Like a fish on a bicycle"; // return "Like a fish on a bicycle";
case FALLING: // case FALLING:
return "Faceplant the floor, headbutt the ground"; // return "Faceplant the floor, headbutt the ground";
case CLIMBING: // case CLIMBING:
return "Climb the highest mountain"; // return "Climb the highest mountain";
case FLYING: // case FLYING:
return "I believe I can fly"; // return "I believe I can fly";
case DIVING: // case DIVING:
return "Scuba club 4000"; // return "Scuba club 4000";
case PIGGY: // case PIGGY:
return "OINK! OINK!"; // return "OINK! OINK!";
default: // default:
return "Sit and wait?"; // return "Sit and wait?";
} // }
} // }
//
@Override // @Override
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) { // public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
if (args.length == 1) { // if (args.length == 1) {
return ImmutableList.of("?"); // return ImmutableList.of("?");
} // }
return ImmutableList.of(); // return ImmutableList.of();
} // }
//
private List<String> effectsDisplay(FakeSkillType fakeSkillType) { // private List<String> effectsDisplay(FakeSkillType fakeSkillType) {
List<String> messages = new ArrayList<>(); // List<String> messages = new ArrayList<>();
//
switch (fakeSkillType) { // switch (fakeSkillType) {
case MACHO: // case MACHO:
messages.add(LocaleLoader.getString("Effects.Template", "Punching bag", "Absorb damage, like a bag of sand")); // messages.add(LocaleLoader.getString("Effects.Template", "Punching bag", "Absorb damage, like a bag of sand"));
break; // break;
case JUMPING: // case JUMPING:
messages.add(LocaleLoader.getString("Effects.Template", "Jump", "PRESS SPACE TO JUMP")); // 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")); // messages.add(LocaleLoader.getString("Effects.Template", "Jump Twice", "PRESS SPACE TWICE TO JUMP TWICE"));
break; // break;
case THROWING: // case THROWING:
messages.add(LocaleLoader.getString("Effects.Template", "Drop Item", "Randomly drop items, at random")); // messages.add(LocaleLoader.getString("Effects.Template", "Drop Item", "Randomly drop items, at random"));
break; // break;
case WRECKING: // case WRECKING:
messages.add(LocaleLoader.getString("Effects.Template", "Ralphinator", "Smash windows with your fists")); // messages.add(LocaleLoader.getString("Effects.Template", "Ralphinator", "Smash windows with your fists"));
break; // break;
case CRAFTING: // case CRAFTING:
messages.add(LocaleLoader.getString("Effects.Template", "Crafting", "Chance of successful craft")); // messages.add(LocaleLoader.getString("Effects.Template", "Crafting", "Chance of successful craft"));
break; // break;
case WALKING: // case WALKING:
messages.add(LocaleLoader.getString("Effects.Template", "Walk", "Traveling gracefully by foot")); // messages.add(LocaleLoader.getString("Effects.Template", "Walk", "Traveling gracefully by foot"));
break; // break;
case SWIMMING: // case SWIMMING:
messages.add(LocaleLoader.getString("Effects.Template", "Swim", "Just keep swimming, swimming, swimming")); // messages.add(LocaleLoader.getString("Effects.Template", "Swim", "Just keep swimming, swimming, swimming"));
break; // break;
case FALLING: // case FALLING:
messages.add(LocaleLoader.getString("Effects.Template", "Skydiving", "Go jump of a cliff. No, seriously.")); // messages.add(LocaleLoader.getString("Effects.Template", "Skydiving", "Go jump of a cliff. No, seriously."));
break; // break;
case CLIMBING: // case CLIMBING:
messages.add(LocaleLoader.getString("Effects.Template", "Rock Climber", "Use string to climb mountains faster")); // messages.add(LocaleLoader.getString("Effects.Template", "Rock Climber", "Use string to climb mountains faster"));
break; // break;
case FLYING: // case FLYING:
messages.add(LocaleLoader.getString("Effects.Template", "Fly", "Throw yourself at the ground and miss")); // messages.add(LocaleLoader.getString("Effects.Template", "Fly", "Throw yourself at the ground and miss"));
break; // break;
case DIVING: // case DIVING:
messages.add(LocaleLoader.getString("Effects.Template", "Hold Breath", "Press shift to hold your breath longer")); // messages.add(LocaleLoader.getString("Effects.Template", "Hold Breath", "Press shift to hold your breath longer"));
break; // break;
case PIGGY: // case PIGGY:
messages.add(LocaleLoader.getString("Effects.Template", "Carrot Turbo", "Supercharge your pigs with carrots")); // messages.add(LocaleLoader.getString("Effects.Template", "Carrot Turbo", "Supercharge your pigs with carrots"));
break; // break;
} // }
//
return messages; // return messages;
} // }
//
private List<String> statsDisplay(FakeSkillType fakeSkillType) { // private List<String> statsDisplay(FakeSkillType fakeSkillType) {
List<String> messages = new ArrayList<>(); // List<String> messages = new ArrayList<>();
//
switch (fakeSkillType) { // switch (fakeSkillType) {
case MACHO: // case MACHO:
messages.add(LocaleLoader.formatString("&cDamage Taken: &e{0}%", decimal.format(Misc.getRandom().nextInt(77)))); // messages.add(LocaleLoader.formatString("&cDamage Taken: &e{0}%", decimal.format(Misc.getRandom().nextInt(77))));
break; // break;
case JUMPING: // case JUMPING:
messages.add(LocaleLoader.formatString("&cDouble Jump Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(27)))); // messages.add(LocaleLoader.formatString("&cDouble Jump Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(27))));
break; // break;
case THROWING: // case THROWING:
messages.add(LocaleLoader.formatString("&cDrop Item Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(87)))); // messages.add(LocaleLoader.formatString("&cDrop Item Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(87))));
break; // break;
case WRECKING: // case WRECKING:
messages.add(LocaleLoader.formatString("&cWrecking Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(14)))); // messages.add(LocaleLoader.formatString("&cWrecking Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(14))));
break; // break;
case CRAFTING: // case CRAFTING:
messages.add(LocaleLoader.formatString("&cCrafting Success: &e{0}%", decimal.format(Misc.getRandom().nextInt(27)))); // messages.add(LocaleLoader.formatString("&cCrafting Success: &e{0}%", decimal.format(Misc.getRandom().nextInt(27))));
break; // break;
case WALKING: // case WALKING:
messages.add(LocaleLoader.formatString("&cWalk Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(27)))); // messages.add(LocaleLoader.formatString("&cWalk Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(27))));
break; // break;
case SWIMMING: // case SWIMMING:
messages.add(LocaleLoader.formatString("&cSwim Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(27)))); // messages.add(LocaleLoader.formatString("&cSwim Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(27))));
break; // break;
case FALLING: // case FALLING:
messages.add(LocaleLoader.formatString("&cSkydiving Success: &e{0}%", decimal.format(Misc.getRandom().nextInt(37)))); // messages.add(LocaleLoader.formatString("&cSkydiving Success: &e{0}%", decimal.format(Misc.getRandom().nextInt(37))));
break; // break;
case CLIMBING: // case CLIMBING:
messages.add(LocaleLoader.formatString("&cRock Climber Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(27)))); // messages.add(LocaleLoader.formatString("&cRock Climber Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(27))));
break; // break;
case FLYING: // case FLYING:
messages.add(LocaleLoader.formatString("&cFly Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(27)))); // messages.add(LocaleLoader.formatString("&cFly Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(27))));
break; // break;
case DIVING: // case DIVING:
messages.add(LocaleLoader.formatString("&cHold Breath Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(27)))); // messages.add(LocaleLoader.formatString("&cHold Breath Chance: &e{0}%", decimal.format(Misc.getRandom().nextInt(27))));
break; // break;
case PIGGY: // case PIGGY:
messages.add(LocaleLoader.formatString("&cCarrot Turbo Boost: &e{0}%", decimal.format(Misc.getRandom().nextInt(80)) + 10)); // messages.add(LocaleLoader.formatString("&cCarrot Turbo Boost: &e{0}%", decimal.format(Misc.getRandom().nextInt(80)) + 10));
break; // break;
} // }
//
return messages; // return messages;
} // }
} //}

View File

@ -2,7 +2,6 @@ package com.gmail.nossr50.commands.skills;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
import com.gmail.nossr50.listeners.InteractionManager; import com.gmail.nossr50.listeners.InteractionManager;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;

View File

@ -19,15 +19,16 @@ import java.util.List;
public class SwordsCommand extends SkillCommand { public class SwordsCommand extends SkillCommand {
private String counterChance; private String counterChance;
private String counterChanceLucky; private String counterChanceLucky;
private int bleedLength;
private String bleedChance;
private String bleedChanceLucky;
private String serratedStrikesLength; private String serratedStrikesLength;
private String serratedStrikesLengthEndurance; private String serratedStrikesLengthEndurance;
private String rupturePureTickDamageAgainstPlayers, rupturePureTickDamageAgainstMobs,
ruptureExplosionDamageAgainstPlayers, ruptureExplosionDamageAgainstMobs,
ruptureLengthSecondsAgainstPlayers, ruptureLengthSecondsAgainstMobs, ruptureChanceToApply, ruptureChanceToApplyLucky;
private boolean canCounter; private boolean canCounter;
private boolean canSerratedStrike; private boolean canSerratedStrike;
private boolean canBleed; private boolean canRupture;
public SwordsCommand() { public SwordsCommand() {
super(PrimarySkillType.SWORDS); super(PrimarySkillType.SWORDS);
@ -43,12 +44,19 @@ public class SwordsCommand extends SkillCommand {
} }
// SWORDS_RUPTURE // SWORDS_RUPTURE
if (canBleed) { if (canRupture) {
bleedLength = UserManager.getPlayer(player).getSwordsManager().getRuptureBleedTicks(); int ruptureRank = RankUtils.getRank(player, SubSkillType.SWORDS_RUPTURE);
ruptureLengthSecondsAgainstPlayers = String.valueOf(AdvancedConfig.getInstance().getRuptureDurationSeconds(true));
ruptureLengthSecondsAgainstMobs = String.valueOf(AdvancedConfig.getInstance().getRuptureDurationSeconds(false));
String[] bleedStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.SWORDS_RUPTURE); rupturePureTickDamageAgainstPlayers = String.valueOf(AdvancedConfig.getInstance().getRuptureTickDamage(true, ruptureRank));
bleedChance = bleedStrings[0]; rupturePureTickDamageAgainstMobs = String.valueOf(AdvancedConfig.getInstance().getRuptureTickDamage(false, ruptureRank));
bleedChanceLucky = bleedStrings[1];
ruptureExplosionDamageAgainstPlayers = String.valueOf(AdvancedConfig.getInstance().getRuptureExplosionDamage(true, ruptureRank));
ruptureExplosionDamageAgainstMobs = String.valueOf(AdvancedConfig.getInstance().getRuptureExplosionDamage(false, ruptureRank));
ruptureChanceToApply = String.valueOf(AdvancedConfig.getInstance().getRuptureChanceToApplyOnHit(ruptureRank) + "%");
ruptureChanceToApplyLucky = String.valueOf(AdvancedConfig.getInstance().getRuptureChanceToApplyOnHit(ruptureRank) * 1.33);
} }
// SERRATED STRIKES // SERRATED STRIKES
@ -61,7 +69,7 @@ public class SwordsCommand extends SkillCommand {
@Override @Override
protected void permissionsCheck(Player player) { protected void permissionsCheck(Player player) {
canBleed = canUseSubskill(player, SubSkillType.SWORDS_RUPTURE); canRupture = canUseSubskill(player, SubSkillType.SWORDS_RUPTURE);
canCounter = canUseSubskill(player, SubSkillType.SWORDS_COUNTER_ATTACK); canCounter = canUseSubskill(player, SubSkillType.SWORDS_COUNTER_ATTACK);
canSerratedStrike = RankUtils.hasUnlockedSubskill(player, SubSkillType.SWORDS_SERRATED_STRIKES) && Permissions.serratedStrikes(player); canSerratedStrike = RankUtils.hasUnlockedSubskill(player, SubSkillType.SWORDS_SERRATED_STRIKES) && Permissions.serratedStrikes(player);
} }
@ -70,22 +78,20 @@ public class SwordsCommand extends SkillCommand {
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) { protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
List<String> messages = new ArrayList<>(); List<String> messages = new ArrayList<>();
int ruptureTicks = UserManager.getPlayer(player).getSwordsManager().getRuptureBleedTicks();
double ruptureDamagePlayers = RankUtils.getRank(player, SubSkillType.SWORDS_RUPTURE) >= 3 ? AdvancedConfig.getInstance().getRuptureDamagePlayer() * 1.5D : AdvancedConfig.getInstance().getRuptureDamagePlayer();
double ruptureDamageMobs = RankUtils.getRank(player, SubSkillType.SWORDS_RUPTURE) >= 3 ? AdvancedConfig.getInstance().getRuptureDamageMobs() * 1.5D : AdvancedConfig.getInstance().getRuptureDamageMobs();
if (canCounter) { if (canCounter) {
messages.add(getStatMessage(SubSkillType.SWORDS_COUNTER_ATTACK, counterChance) messages.add(getStatMessage(SubSkillType.SWORDS_COUNTER_ATTACK, counterChance)
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", counterChanceLucky) : "")); + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", counterChanceLucky) : ""));
} }
if (canBleed) { if (canRupture) {
messages.add(getStatMessage(SubSkillType.SWORDS_RUPTURE, bleedChance) messages.add(getStatMessage(SubSkillType.SWORDS_RUPTURE, ruptureChanceToApply)
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", bleedChanceLucky) : "")); + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", ruptureChanceToApplyLucky) : ""));
messages.add(getStatMessage(true, true, SubSkillType.SWORDS_RUPTURE, messages.add(getStatMessage(true, true, SubSkillType.SWORDS_RUPTURE,
String.valueOf(ruptureTicks), ruptureLengthSecondsAgainstPlayers,
String.valueOf(ruptureDamagePlayers), ruptureLengthSecondsAgainstMobs));
String.valueOf(ruptureDamageMobs)));
messages.add(LocaleLoader.getString("Swords.SubSkill.Rupture.Stat.TickDamage", rupturePureTickDamageAgainstPlayers, rupturePureTickDamageAgainstMobs));
messages.add(LocaleLoader.getString("Swords.SubSkill.Rupture.Stat.ExplosionDamage", ruptureExplosionDamageAgainstPlayers, ruptureExplosionDamageAgainstMobs));
messages.add(LocaleLoader.getString("Swords.Combat.Rupture.Note")); messages.add(LocaleLoader.getString("Swords.Combat.Rupture.Note"));
} }

View File

@ -310,25 +310,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
} }
/* SWORDS */ /* SWORDS */
if (getMaximumProbability(SubSkillType.SWORDS_RUPTURE) < 1) {
reason.add("Skills.Swords.Rupture.ChanceMax should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.SWORDS_RUPTURE) < 1) {
reason.add("Skills.Swords.Rupture.MaxBonusLevel should be at least 1!");
}
if (getRuptureMaxTicks() < 1) {
reason.add("Skills.Swords.Rupture.MaxTicks should be at least 1!");
}
if (getRuptureMaxTicks() < getRuptureBaseTicks()) {
reason.add("Skills.Swords.Rupture.MaxTicks should be at least Skills.Swords.Rupture.BaseTicks!");
}
if (getRuptureBaseTicks() < 1) {
reason.add("Skills.Swords.Rupture.BaseTicks should be at least 1!");
}
if (getMaximumProbability(SubSkillType.SWORDS_COUNTER_ATTACK) < 1) { if (getMaximumProbability(SubSkillType.SWORDS_COUNTER_ATTACK) < 1) {
reason.add("Skills.Swords.CounterAttack.ChanceMax should be at least 1!"); reason.add("Skills.Swords.CounterAttack.ChanceMax should be at least 1!");
@ -665,13 +646,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
public double getGracefulRollDamageThreshold() { return config.getDouble("Skills.Acrobatics.GracefulRoll.DamageThreshold", 14.0D); } public double getGracefulRollDamageThreshold() { return config.getDouble("Skills.Acrobatics.GracefulRoll.DamageThreshold", 14.0D); }
/* ALCHEMY */ /* ALCHEMY */
/*public int getCatalysisUnlockLevel() { return config.getInt("Skills.Alchemy.Catalysis.UnlockLevel", 100); }*/
public int getCatalysisMaxBonusLevel() { return config.getInt("Skills.Alchemy.Catalysis.MaxBonusLevel", 1000); } public int getCatalysisMaxBonusLevel() { return config.getInt("Skills.Alchemy.Catalysis.MaxBonusLevel", 1000); }
public double getCatalysisMinSpeed() { return config.getDouble("Skills.Alchemy.Catalysis.MinSpeed", 1.0D); } public double getCatalysisMinSpeed() { return config.getDouble("Skills.Alchemy.Catalysis.MinSpeed", 1.0D); }
public double getCatalysisMaxSpeed() { return config.getDouble("Skills.Alchemy.Catalysis.MaxSpeed", 4.0D); } public double getCatalysisMaxSpeed() { return config.getDouble("Skills.Alchemy.Catalysis.MaxSpeed", 4.0D); }
//public int getConcoctionsTierLevel(Alchemy.Tier tier) { return config.getInt("Skills.Alchemy.Rank_Levels.Rank_" + rank); }
/* ARCHERY */ /* ARCHERY */
public double getSkillShotRankDamageMultiplier() { return config.getDouble("Skills.Archery.SkillShot.RankDamageMultiplier", 10.0D); } public double getSkillShotRankDamageMultiplier() { return config.getDouble("Skills.Archery.SkillShot.RankDamageMultiplier", 10.0D); }
@ -700,7 +679,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
//Nothing to configure, everything is already configurable in config.yml //Nothing to configure, everything is already configurable in config.yml
/* FISHING */ /* FISHING */
//public int getFishingTierLevel(int rank) { return config.getInt("Skills.Fishing.Rank_Levels.Rank_" + rank); }
public double getShakeChance(int rank) { return config.getDouble("Skills.Fishing.ShakeChance.Rank_" + rank); } public double getShakeChance(int rank) { return config.getDouble("Skills.Fishing.ShakeChance.Rank_" + rank); }
public int getFishingVanillaXPModifier(int rank) { return config.getInt("Skills.Fishing.VanillaXPMultiplier.Rank_" + rank); } public int getFishingVanillaXPModifier(int rank) { return config.getInt("Skills.Fishing.VanillaXPMultiplier.Rank_" + rank); }
@ -712,9 +690,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
public int getFishingReductionMaxWaitCap() { return config.getInt("Skills.Fishing.MasterAngler.Tick_Reduction_Caps.Max_Wait", 100);} public int getFishingReductionMaxWaitCap() { return config.getInt("Skills.Fishing.MasterAngler.Tick_Reduction_Caps.Max_Wait", 100);}
public int getFishermanDietRankChange() { return config.getInt("Skills.Fishing.FishermansDiet.RankChange", 200); } public int getFishermanDietRankChange() { return config.getInt("Skills.Fishing.FishermansDiet.RankChange", 200); }
/*public int getIceFishingUnlockLevel() { return config.getInt("Skills.Fishing.IceFishing.UnlockLevel", 50); }
public int getMasterAnglerUnlockLevel() {return config.getInt("Skills.Fishing.MasterAngler.UnlockLevel", 125); }*/
public double getMasterAnglerBoatModifier() {return config.getDouble("Skills.Fishing.MasterAngler.BoatModifier", 2.0); } public double getMasterAnglerBoatModifier() {return config.getDouble("Skills.Fishing.MasterAngler.BoatModifier", 2.0); }
public double getMasterAnglerBiomeModifier() {return config.getDouble("Skills.Fishing.MasterAngler.BiomeModifier", 2.0); } public double getMasterAnglerBiomeModifier() {return config.getDouble("Skills.Fishing.MasterAngler.BiomeModifier", 2.0); }
@ -737,23 +713,15 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
public double getRepairMasteryMaxBonus() { return config.getDouble("Skills.Repair.RepairMastery.MaxBonusPercentage", 200.0D); } public double getRepairMasteryMaxBonus() { return config.getDouble("Skills.Repair.RepairMastery.MaxBonusPercentage", 200.0D); }
public int getRepairMasteryMaxLevel() { return config.getInt("Skills.Repair.RepairMastery.MaxBonusLevel", 100); } public int getRepairMasteryMaxLevel() { return config.getInt("Skills.Repair.RepairMastery.MaxBonusLevel", 100); }
/* Arcane Forging */
//public int getArcaneForgingRankLevel(int rank) { return config.getInt("Skills.Repair.ArcaneForging.Rank_Levels.Rank_" + rank); }
public boolean getArcaneForgingEnchantLossEnabled() { return config.getBoolean("Skills.Repair.ArcaneForging.May_Lose_Enchants", true); } public boolean getArcaneForgingEnchantLossEnabled() { return config.getBoolean("Skills.Repair.ArcaneForging.May_Lose_Enchants", true); }
public double getArcaneForgingKeepEnchantsChance(int rank) { return config.getDouble("Skills.Repair.ArcaneForging.Keep_Enchants_Chance.Rank_" + rank); } public double getArcaneForgingKeepEnchantsChance(int rank) { return config.getDouble("Skills.Repair.ArcaneForging.Keep_Enchants_Chance.Rank_" + rank); }
public boolean getArcaneForgingDowngradeEnabled() { return config.getBoolean("Skills.Repair.ArcaneForging.Downgrades_Enabled", true); } public boolean getArcaneForgingDowngradeEnabled() { return config.getBoolean("Skills.Repair.ArcaneForging.Downgrades_Enabled", true); }
public double getArcaneForgingDowngradeChance(int rank) { return config.getDouble("Skills.Repair.ArcaneForging.Downgrades_Chance.Rank_" + rank); } public double getArcaneForgingDowngradeChance(int rank) { return config.getDouble("Skills.Repair.ArcaneForging.Downgrades_Chance.Rank_" + rank); }
/* SALVAGE */
//public double getSalvageMaxPercentage() { return config.getDouble("Skills.Salvage.MaxPercentage", 100.0D); }
//public int getSalvageMaxPercentageLevel() { return config.getInt("Skills.Salvage.MaxPercentageLevel", 1000); }
public boolean getArcaneSalvageEnchantDowngradeEnabled() { return config.getBoolean("Skills.Salvage.ArcaneSalvage.EnchantDowngradeEnabled", true); } public boolean getArcaneSalvageEnchantDowngradeEnabled() { return config.getBoolean("Skills.Salvage.ArcaneSalvage.EnchantDowngradeEnabled", true); }
public boolean getArcaneSalvageEnchantLossEnabled() { return config.getBoolean("Skills.Salvage.ArcaneSalvage.EnchantLossEnabled", true); } public boolean getArcaneSalvageEnchantLossEnabled() { return config.getBoolean("Skills.Salvage.ArcaneSalvage.EnchantLossEnabled", true); }
//public int getArcaneSalvageRankLevel(int rank) { return config.getInt("Skills.Salvage.ArcaneSalvage.Rank_Levels.Rank_" + rank); }
public double getArcaneSalvageExtractFullEnchantsChance(int rank) { return config.getDouble("Skills.Salvage.ArcaneSalvage.ExtractFullEnchant.Rank_" + rank); } public double getArcaneSalvageExtractFullEnchantsChance(int rank) { return config.getDouble("Skills.Salvage.ArcaneSalvage.ExtractFullEnchant.Rank_" + rank); }
public double getArcaneSalvageExtractPartialEnchantsChance(int rank) { return config.getDouble("Skills.Salvage.ArcaneSalvage.ExtractPartialEnchant.Rank_" + rank); } public double getArcaneSalvageExtractPartialEnchantsChance(int rank) { return config.getDouble("Skills.Salvage.ArcaneSalvage.ExtractPartialEnchant.Rank_" + rank); }
@ -765,19 +733,35 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
return config.getInt("Skills.Smelting.FuelEfficiency.Standard.MaxBonusLevel", 100); return config.getInt("Skills.Smelting.FuelEfficiency.Standard.MaxBonusLevel", 100);
} }
/*public int getFluxMiningUnlockLevel() { return config.getInt("Skills.Smelting.FluxMining.UnlockLevel", 250); }*/
public double getFluxMiningChance() { return config.getDouble("Skills.Smelting.FluxMining.Chance", 33.0D); } public double getFluxMiningChance() { return config.getDouble("Skills.Smelting.FluxMining.Chance", 33.0D); }
public int getSmeltingRankLevel(int rank) { return config.getInt("Skills.Smelting.Rank_Levels.Rank_" + rank); }
public int getSmeltingVanillaXPBoostMultiplier(int rank) { return config.getInt("Skills.Smelting.VanillaXPMultiplier.Rank_" + rank); }
/* SWORDS */ /* SWORDS */
public double getRuptureDamagePlayer() { return config.getDouble("Skills.Swords.Rupture.DamagePlayer", 1.0); } public double getRuptureTickDamage(boolean isTargetPlayer, int rank) {
public double getRuptureDamageMobs() { return config.getDouble("Skills.Swords.Rupture.DamageMobs", 2.0); } String root = "Skills.Swords.Rupture.Rupture_Mechanics.Tick_Interval_Damage.Against_";
String targetType = isTargetPlayer ? "Players" : "Mobs";
String key = root + targetType + ".Rank_" + rank;
public int getRuptureMaxTicks() { return config.getInt("Skills.Swords.Rupture.MaxTicks", 8); } return config.getDouble(key, 1.0D);
public int getRuptureBaseTicks() { return config.getInt("Skills.Swords.Rupture.BaseTicks", 2); } }
public int getRuptureDurationSeconds(boolean isTargetPlayer) {
String root = "Skills.Swords.Rupture.Rupture_Mechanics.Duration_In_Seconds.Against_";
String targetType = isTargetPlayer ? "Players" : "Mobs";
return config.getInt(root + targetType, 5);
}
public double getRuptureExplosionDamage(boolean isTargetPlayer, int rank) {
String root = "Skills.Swords.Rupture.Rupture_Mechanics.Explosion_Damage.Against_";
String targetType = isTargetPlayer ? "Players" : "Mobs";
String key = root + targetType + ".Rank_" + rank;
return config.getDouble(key, 40.0D);
}
public double getRuptureChanceToApplyOnHit(int rank) {
String root = "Skills.Swords.Rupture.Rupture_Mechanics.Chance_To_Apply_On_Hit.Rank_";
return config.getDouble(root + rank, 33);
}
public double getCounterModifier() { return config.getDouble("Skills.Swords.CounterAttack.DamageModifier", 2.0D); } public double getCounterModifier() { return config.getDouble("Skills.Swords.CounterAttack.DamageModifier", 2.0D); }
@ -785,24 +769,15 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
public int getSerratedStrikesTicks() { return config.getInt("Skills.Swords.SerratedStrikes.RuptureTicks", 5); } public int getSerratedStrikesTicks() { return config.getInt("Skills.Swords.SerratedStrikes.RuptureTicks", 5); }
/* TAMING */ /* TAMING */
//public int getGoreRuptureTicks() { return config.getInt("Skills.Taming.Gore.RuptureTicks", 2); }
public double getGoreModifier() { return config.getDouble("Skills.Taming.Gore.Modifier", 2.0D); } public double getGoreModifier() { return config.getDouble("Skills.Taming.Gore.Modifier", 2.0D); }
/*public int getFastFoodUnlock() { return config.getInt("Skills.Taming.FastFood.UnlockLevel", 50); }*/
public double getFastFoodChance() { return config.getDouble("Skills.Taming.FastFoodService.Chance", 50.0D); } public double getFastFoodChance() { return config.getDouble("Skills.Taming.FastFoodService.Chance", 50.0D); }
public double getPummelChance() { return config.getDouble("Skills.Taming.Pummel.Chance", 10.0D); } public double getPummelChance() { return config.getDouble("Skills.Taming.Pummel.Chance", 10.0D); }
//public int getEnviromentallyAwareUnlock() { return config.getInt("Skills.Taming.EnvironmentallyAware.UnlockLevel", 100); }
/*public int getThickFurUnlock() { return config.getInt("Skills.Taming.ThickFur.UnlockLevel", 250); }*/
public double getThickFurModifier() { return config.getDouble("Skills.Taming.ThickFur.Modifier", 2.0D); } public double getThickFurModifier() { return config.getDouble("Skills.Taming.ThickFur.Modifier", 2.0D); }
/*public int getHolyHoundUnlock() {return config.getInt("Skills.Taming.HolyHound.UnlockLevel", 375); }*/
/*public int getShockProofUnlock() { return config.getInt("Skills.Taming.ShockProof.UnlockLevel", 500); }*/
public double getShockProofModifier() { return config.getDouble("Skills.Taming.ShockProof.Modifier", 6.0D); } public double getShockProofModifier() { return config.getDouble("Skills.Taming.ShockProof.Modifier", 6.0D); }
/*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 getMinHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MinHorseJumpStrength", 0.7D); }

View File

@ -53,11 +53,11 @@ public abstract class AutoUpdateConfigLoader extends ConfigLoader {
if (!newKeys.isEmpty() || !oldKeys.isEmpty()) { if (!newKeys.isEmpty() || !oldKeys.isEmpty()) {
needSave = true; needSave = true;
} }
//
for (String key : oldKeys) { // for (String key : oldKeys) {
plugin.debug("Detected potentially unused key: " + key); // plugin.debug("Detected potentially unused key: " + key);
//config.set(key, null); // //config.set(key, null);
} // }
for (String key : newKeys) { for (String key : newKeys) {
plugin.debug("Adding new key: " + key + " = " + internalConfig.get(key)); plugin.debug("Adding new key: " + key + " = " + internalConfig.get(key));

View File

@ -243,8 +243,6 @@ public class Config extends AutoUpdateConfigLoader {
* GENERAL SETTINGS * GENERAL SETTINGS
*/ */
public boolean isAprilFoolsAllowed() { return config.getBoolean("General.AprilFoolsEvent", true); }
/* General Settings */ /* General Settings */
public boolean getIsMetricsEnabled() { return config.getBoolean("Metrics.bstats", true); } public boolean getIsMetricsEnabled() { return config.getBoolean("Metrics.bstats", true); }

View File

@ -25,7 +25,10 @@ public class TreasureConfig extends ConfigLoader {
public static final String FILENAME = "treasures.yml"; public static final String FILENAME = "treasures.yml";
public static final String LEVEL_REQUIREMENT_RETRO_MODE = ".Level_Requirement.Retro_Mode"; public static final String LEVEL_REQUIREMENT_RETRO_MODE = ".Level_Requirement.Retro_Mode";
public static final String LEVEL_REQUIREMENT_STANDARD_MODE = ".Level_Requirement.Standard_Mode"; public static final String LEVEL_REQUIREMENT_STANDARD_MODE = ".Level_Requirement.Standard_Mode";
public static final String WRONG_KEY_VALUE_STANDARD = ".Drop_Level.Standard_Mode";
public static final String WRONG_KEY_VALUE_RETRO = ".Drop_Level.Retro_Mode";
public static final String LEGACY_DROP_LEVEL = ".Drop_Level"; public static final String LEGACY_DROP_LEVEL = ".Drop_Level";
public static final String WRONG_KEY_ROOT = ".Drop_Level";
private static TreasureConfig instance; private static TreasureConfig instance;
public HashMap<String, List<ExcavationTreasure>> excavationMap = new HashMap<>(); public HashMap<String, List<ExcavationTreasure>> excavationMap = new HashMap<>();
@ -65,7 +68,7 @@ public class TreasureConfig extends ConfigLoader {
} }
private void loadTreasures(String type) { private void loadTreasures(String type) {
boolean updatedFile = false; boolean shouldWeUpdateFile = false;
boolean isExcavation = type.equals("Excavation"); boolean isExcavation = type.equals("Excavation");
boolean isHylian = type.equals("Hylian_Luck"); boolean isHylian = type.equals("Hylian_Luck");
@ -109,28 +112,38 @@ public class TreasureConfig extends ConfigLoader {
int xp = config.getInt(type + "." + treasureName + ".XP"); int xp = config.getInt(type + "." + treasureName + ".XP");
double dropChance = config.getDouble(type + "." + treasureName + ".Drop_Chance"); double dropChance = config.getDouble(type + "." + treasureName + ".Drop_Chance");
int legacyDropLevel = config.getInt(type + "." + treasureName + LEGACY_DROP_LEVEL, -1); DropLevelKeyConversionType conversionType;
//Check for legacy drop level values and convert
if(getWrongKeyValue(type, treasureName, DropLevelKeyConversionType.LEGACY) != -1) {
//Legacy Drop level, needs to be converted
shouldWeUpdateFile = processAutomaticKeyConversion(type, shouldWeUpdateFile, treasureName, DropLevelKeyConversionType.LEGACY);
}
//Check for a bad key that was accidentally shipped out to some users
if(getWrongKeyValue(type, treasureName, DropLevelKeyConversionType.WRONG_KEY_STANDARD) != -1) {
//Partially converted to the new system, I had a dyslexic moment so some configs have this
shouldWeUpdateFile = processAutomaticKeyConversion(type, shouldWeUpdateFile, treasureName, DropLevelKeyConversionType.WRONG_KEY_STANDARD);
}
//Check for a bad key that was accidentally shipped out to some users
if(getWrongKeyValue(type, treasureName, DropLevelKeyConversionType.WRONG_KEY_RETRO) != -1) {
//Partially converted to the new system, I had a dyslexic moment so some configs have this
shouldWeUpdateFile = processAutomaticKeyConversion(type, shouldWeUpdateFile, treasureName, DropLevelKeyConversionType.WRONG_KEY_RETRO);
}
int dropLevel = -1; int dropLevel = -1;
if(legacyDropLevel >= 0) {
//Config needs to be updated to be more specific
mcMMO.p.getLogger().info("(" + treasureName + ") Updating Drop_Level in treasures.yml for treasure to match new expected format");
config.set(type + "." + treasureName + LEGACY_DROP_LEVEL, null);
config.set(type + "." + treasureName + LEVEL_REQUIREMENT_RETRO_MODE, legacyDropLevel * 10);
config.set(type + "." + treasureName + LEVEL_REQUIREMENT_STANDARD_MODE, legacyDropLevel);
updatedFile = true;
}
if(mcMMO.isRetroModeEnabled()) { if(mcMMO.isRetroModeEnabled()) {
dropLevel = config.getInt(type + "." + treasureName + LEVEL_REQUIREMENT_RETRO_MODE, 0); dropLevel = config.getInt(type + "." + treasureName + LEVEL_REQUIREMENT_RETRO_MODE, -1);
} else { } else {
dropLevel = config.getInt(type + "." + treasureName + LEVEL_REQUIREMENT_STANDARD_MODE, 0); dropLevel = config.getInt(type + "." + treasureName + LEVEL_REQUIREMENT_STANDARD_MODE, -1);
} }
if(dropLevel < 0) { if(dropLevel == -1) {
mcMMO.p.getLogger().info("Treasure drop level wasn't valid, using a default value."); mcMMO.p.getLogger().severe("Could not find a Level_Requirement entry for treasure " + treasureName);
//Set it to the "max" if we don't have a drop level mcMMO.p.getLogger().severe("Skipping treasure");
dropLevel = 0; continue;
} }
if (xp < 0) { if (xp < 0) {
@ -141,7 +154,6 @@ public class TreasureConfig extends ConfigLoader {
reason.add(treasureName + " has an invalid Drop_Chance: " + dropChance); reason.add(treasureName + " has an invalid Drop_Chance: " + dropChance);
} }
/* /*
* Itemstack * Itemstack
*/ */
@ -246,7 +258,7 @@ public class TreasureConfig extends ConfigLoader {
} }
//Apply our fix //Apply our fix
if(updatedFile) { if(shouldWeUpdateFile) {
try { try {
config.save(getFile()); config.save(getFile());
} catch (IOException e) { } catch (IOException e) {
@ -255,6 +267,63 @@ public class TreasureConfig extends ConfigLoader {
} }
} }
private boolean processAutomaticKeyConversion(String type, boolean shouldWeUpdateTheFile, String treasureName, DropLevelKeyConversionType conversionType) {
switch (conversionType) {
case LEGACY:
int legacyDropLevel = getWrongKeyValue(type, treasureName, conversionType); //Legacy only had one value, Retro Mode didn't have a setting
//Config needs to be updated to be more specific
mcMMO.p.getLogger().info("(" + treasureName + ") [Fixing bad address: Legacy] Converting Drop_Level to Level_Requirement in treasures.yml for treasure to match new expected format");
config.set(type + "." + treasureName + LEGACY_DROP_LEVEL, null); //Remove legacy entry
config.set(type + "." + treasureName + LEVEL_REQUIREMENT_RETRO_MODE, legacyDropLevel * 10); //Multiply by 10 for Retro
config.set(type + "." + treasureName + LEVEL_REQUIREMENT_STANDARD_MODE, legacyDropLevel);
shouldWeUpdateTheFile = true;
break;
case WRONG_KEY_STANDARD:
mcMMO.p.getLogger().info("(" + treasureName + ") [Fixing bad address: STANDARD] Converting Drop_Level to Level_Requirement in treasures.yml for treasure to match new expected format");
int wrongKeyValueStandard = getWrongKeyValue(type, treasureName, conversionType);
config.set(type + "." + treasureName + WRONG_KEY_ROOT, null); //We also kill the Retro key here as we have enough information for setting in values if needed
if(wrongKeyValueStandard != -1) {
config.set(type + "." + treasureName + LEVEL_REQUIREMENT_STANDARD_MODE, wrongKeyValueStandard);
config.set(type + "." + treasureName + LEVEL_REQUIREMENT_RETRO_MODE, wrongKeyValueStandard * 10); //Multiply by 10 for Retro
}
shouldWeUpdateTheFile = true;
break;
case WRONG_KEY_RETRO:
mcMMO.p.getLogger().info("(" + treasureName + ") [Fixing bad address: RETRO] Converting Drop_Level to Level_Requirement in treasures.yml for treasure to match new expected format");
int wrongKeyValueRetro = getWrongKeyValue(type, treasureName, conversionType);
config.set(type + "." + treasureName + WRONG_KEY_ROOT, null); //We also kill the Retro key here as we have enough information for setting in values if needed
if(wrongKeyValueRetro != -1) {
config.set(type + "." + treasureName + LEVEL_REQUIREMENT_RETRO_MODE, wrongKeyValueRetro);
}
shouldWeUpdateTheFile = true;
break;
}
return shouldWeUpdateTheFile;
}
private int getWrongKeyValue(String type, String treasureName, DropLevelKeyConversionType dropLevelKeyConversionType) {
switch (dropLevelKeyConversionType) {
case LEGACY:
return config.getInt(type + "." + treasureName + LEGACY_DROP_LEVEL, -1);
case WRONG_KEY_STANDARD:
return config.getInt(type + "." + treasureName + WRONG_KEY_VALUE_STANDARD, -1);
case WRONG_KEY_RETRO:
return config.getInt(type + "." + treasureName + WRONG_KEY_VALUE_RETRO, -1);
}
return -1;
}
private enum DropLevelKeyConversionType {
LEGACY,
WRONG_KEY_STANDARD,
WRONG_KEY_RETRO
}
private void AddHylianTreasure(String dropper, HylianTreasure treasure) { private void AddHylianTreasure(String dropper, HylianTreasure treasure) {
if (!hylianMap.containsKey(dropper)) if (!hylianMap.containsKey(dropper))
hylianMap.put(dropper, new ArrayList<>()); hylianMap.put(dropper, new ArrayList<>());

View File

@ -0,0 +1,25 @@
package com.gmail.nossr50.datatypes.meta;
import com.gmail.nossr50.runnables.skills.RuptureTask;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
public class RuptureTaskMeta extends FixedMetadataValue {
private final @NotNull RuptureTask ruptureTask;
/**
* Initializes a FixedMetadataValue with an Object
*
* @param owningPlugin the {@link Plugin} that created this metadata value
* @param ruptureTask the value assigned to this metadata value
*/
public RuptureTaskMeta(@NotNull Plugin owningPlugin, @NotNull RuptureTask ruptureTask) {
super(owningPlugin, ruptureTask);
this.ruptureTask = ruptureTask;
}
public @NotNull RuptureTask getRuptureTimerTask() {
return ruptureTask;
}
}

View File

@ -530,6 +530,10 @@ public class EntityListener implements Listener {
if(WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld())) if(WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld()))
return; return;
if(event.getEntity().hasMetadata(mcMMO.EXPLOSION_FROM_RUPTURE)) {
event.getEntity().removeMetadata(mcMMO.EXPLOSION_FROM_RUPTURE, mcMMO.p);
}
if(event.getEntity() instanceof Player) if(event.getEntity() instanceof Player)
{ {
Player player = (Player) event.getEntity(); Player player = (Player) event.getEntity();
@ -702,7 +706,7 @@ public class EntityListener implements Listener {
*/ */
@EventHandler(priority = EventPriority.LOWEST) @EventHandler(priority = EventPriority.LOWEST)
public void onEntityDeathLowest(EntityDeathEvent event) { public void onEntityDeathLowest(EntityDeathEvent event) {
mcMMO.getTransientMetadataTools().cleanAllMobMetadata(event.getEntity()); mcMMO.getTransientMetadataTools().cleanAllLivingEntityMetadata(event.getEntity());
} }
/** /**

View File

@ -546,6 +546,7 @@ public class PlayerListener implements Listener {
//Use a sync save if the server is shutting down to avoid race conditions //Use a sync save if the server is shutting down to avoid race conditions
//TODO: Actually never sure its possible for this event to fire during server shutdown, should double check that... //TODO: Actually never sure its possible for this event to fire during server shutdown, should double check that...
UserManager.logout(mcMMOPlayer, mcMMO.isServerShutdownExecuted()); UserManager.logout(mcMMOPlayer, mcMMO.isServerShutdownExecuted());
mcMMO.getTransientMetadataTools().cleanAllLivingEntityMetadata(event.getPlayer());
} }
/** /**
@ -972,16 +973,53 @@ public class PlayerListener implements Listener {
} }
} }
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) /**
public void onPlayerStatisticIncrementEvent(PlayerStatisticIncrementEvent event) { * When a {@link Player} attempts to place an {@link ItemStack}
/* WORLD BLACKLIST CHECK */ * into an {@link ItemFrame}, we want to make sure to remove any
if(WorldBlacklist.isWorldBlacklisted(event.getPlayer().getWorld())) * Ability buffs from that item.
return; *
* @param event The {@link PlayerInteractEntityEvent} to handle
*/
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerInteractEntity(PlayerInteractEntityEvent event) {
/*
* We can check for an instance instead of EntityType here, so we are
* ready for the infamous "Glow Item Frame" in 1.17 too!
*/
if (event.getRightClicked() instanceof ItemFrame) {
ItemFrame frame = (ItemFrame) event.getRightClicked();
if (!mcMMO.getHolidayManager().isAprilFirst()) { // Check for existing items (ignore rotations)
return; if (frame.getItem().getType() != Material.AIR) {
return;
}
// Get the item the Player is about to place
ItemStack itemInHand;
if (event.getHand() == EquipmentSlot.OFF_HAND) {
itemInHand = event.getPlayer().getInventory().getItemInOffHand();
}
else {
itemInHand = event.getPlayer().getInventory().getItemInMainHand();
}
// and remove any skill ability buffs!
SkillUtils.removeAbilityBuff(itemInHand);
} }
mcMMO.getHolidayManager().handleStatisticEvent(event);
} }
//
// @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
// public void onPlayerStatisticIncrementEvent(PlayerStatisticIncrementEvent event) {
// /* WORLD BLACKLIST CHECK */
// if(WorldBlacklist.isWorldBlacklisted(event.getPlayer().getWorld()))
// return;
//
// if (!mcMMO.getHolidayManager().isAprilFirst()) {
// return;
// }
//
// mcMMO.getHolidayManager().handleStatisticEvent(event);
// }
} }

View File

@ -14,7 +14,7 @@ import com.gmail.nossr50.database.DatabaseManagerFactory;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.datatypes.skills.subskills.acrobatics.Roll; import com.gmail.nossr50.datatypes.skills.subskills.acrobatics.Roll;
import com.gmail.nossr50.listeners.*; import com.gmail.nossr50.listeners.*;
import com.gmail.nossr50.runnables.CheckDateTask; import com.gmail.nossr50.party.PartyManager;
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.commands.NotifySquelchReminderTask; import com.gmail.nossr50.runnables.commands.NotifySquelchReminderTask;
@ -23,7 +23,6 @@ import com.gmail.nossr50.runnables.party.PartyAutoKickTask;
import com.gmail.nossr50.runnables.player.ClearRegisteredXPGainTask; import com.gmail.nossr50.runnables.player.ClearRegisteredXPGainTask;
import com.gmail.nossr50.runnables.player.PlayerProfileLoadingTask; import com.gmail.nossr50.runnables.player.PlayerProfileLoadingTask;
import com.gmail.nossr50.runnables.player.PowerLevelUpdatingTask; import com.gmail.nossr50.runnables.player.PowerLevelUpdatingTask;
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
import com.gmail.nossr50.skills.alchemy.Alchemy; import com.gmail.nossr50.skills.alchemy.Alchemy;
import com.gmail.nossr50.skills.child.ChildConfig; import com.gmail.nossr50.skills.child.ChildConfig;
import com.gmail.nossr50.skills.repair.repairables.Repairable; import com.gmail.nossr50.skills.repair.repairables.Repairable;
@ -78,7 +77,6 @@ public class mcMMO extends JavaPlugin {
private static ModManager modManager; private static ModManager modManager;
private static DatabaseManager databaseManager; private static DatabaseManager databaseManager;
private static FormulaManager formulaManager; private static FormulaManager formulaManager;
private static HolidayManager holidayManager;
private static UpgradeManager upgradeManager; private static UpgradeManager upgradeManager;
private static MaterialMapStore materialMapStore; private static MaterialMapStore materialMapStore;
private static PlayerLevelUtils playerLevelUtils; private static PlayerLevelUtils playerLevelUtils;
@ -126,6 +124,8 @@ public class mcMMO extends JavaPlugin {
/* Metadata Values */ /* Metadata Values */
public static final String REPLANT_META_KEY = "mcMMO: Recently Replanted"; public static final String REPLANT_META_KEY = "mcMMO: Recently Replanted";
public static final String EXPLOSION_FROM_RUPTURE = "mcMMO: Rupture Explosion";
public static final String RUPTURE_META_KEY = "mcMMO: RuptureTask";
public static final String FISH_HOOK_REF_METAKEY = "mcMMO: Fish Hook Tracker"; public static final String FISH_HOOK_REF_METAKEY = "mcMMO: Fish Hook Tracker";
public static final String DODGE_TRACKER = "mcMMO: Dodge Tracker"; public static final String DODGE_TRACKER = "mcMMO: Dodge Tracker";
public static final String CUSTOM_DAMAGE_METAKEY = "mcMMO: Custom Damage"; public static final String CUSTOM_DAMAGE_METAKEY = "mcMMO: Custom Damage";
@ -149,9 +149,6 @@ public class mcMMO extends JavaPlugin {
public static FixedMetadataValue metadataValue; public static FixedMetadataValue metadataValue;
public static final String ULTRA_PERMISSONS = "UltraPermissons"; public static final String ULTRA_PERMISSONS = "UltraPermissons";
public static final String UP_WARNING_2 = "Stop using " + ULTRA_PERMISSONS + " with mcMMO immediately!";
public static final String UP_WARNING_1 = "mcMMO has detected " + ULTRA_PERMISSONS + " on your server, users have reported a severe plugin conflict between these two plugins which severely degrades server performance";
public static final String UP_WARNING_3 = "The author of UltraPermissions has passed away and its unlikely this issue will ever be solved";
public mcMMO() { public mcMMO() {
p = this; p = this;
@ -234,7 +231,6 @@ public class mcMMO extends JavaPlugin {
mcMMO.getPartyManager().loadParties(); mcMMO.getPartyManager().loadParties();
formulaManager = new FormulaManager(); formulaManager = new FormulaManager();
holidayManager = new HolidayManager();
for (Player player : getServer().getOnlinePlayers()) { for (Player player : getServer().getOnlinePlayers()) {
new PlayerProfileLoadingTask(player).runTaskLaterAsynchronously(mcMMO.p, 1); // 1 Tick delay to ensure the player is marked as online before we begin loading new PlayerProfileLoadingTask(player).runTaskLaterAsynchronously(mcMMO.p, 1); // 1 Tick delay to ensure the player is marked as online before we begin loading
@ -267,18 +263,6 @@ public class mcMMO extends JavaPlugin {
else else
metrics.addCustomChart(new SimplePie("leveling_system", () -> "Standard")); metrics.addCustomChart(new SimplePie("leveling_system", () -> "Standard"));
} }
if(pluginManager.getPlugin(ULTRA_PERMISSONS) != null) {
Bukkit.getScheduler().runTaskTimer(this, () -> {
getLogger().severe(UP_WARNING_1);
getLogger().severe(UP_WARNING_2);
getLogger().severe(UP_WARNING_3);
Bukkit.broadcastMessage(UP_WARNING_1);
Bukkit.broadcastMessage(UP_WARNING_2);
Bukkit.broadcastMessage(UP_WARNING_3);
}, 0L, 1200L);
}
} }
catch (Throwable t) { catch (Throwable t) {
@ -370,7 +354,6 @@ public class mcMMO extends JavaPlugin {
ScoreboardManager.teardownAll(); ScoreboardManager.teardownAll();
formulaManager.saveFormula(); formulaManager.saveFormula();
holidayManager.saveAnniversaryFiles();
placeStore.closeAll(); placeStore.closeAll();
} }
catch (Exception e) { catch (Exception e) {
@ -443,10 +426,6 @@ public class mcMMO extends JavaPlugin {
return formulaManager; return formulaManager;
} }
public static HolidayManager getHolidayManager() {
return holidayManager;
}
public static ChunkManager getPlaceStore() { public static ChunkManager getPlaceStore() {
return placeStore; return placeStore;
} }
@ -631,9 +610,6 @@ public class mcMMO extends JavaPlugin {
// Cleanup the backups folder // Cleanup the backups folder
new CleanBackupsTask().runTaskAsynchronously(mcMMO.p); new CleanBackupsTask().runTaskAsynchronously(mcMMO.p);
// Bleed timer (Runs every 0.5 seconds)
new BleedTimerTask().runTaskTimer(this, Misc.TICK_CONVERSION_FACTOR, (Misc.TICK_CONVERSION_FACTOR / 2));
// Old & Powerless User remover // Old & Powerless User remover
long purgeIntervalTicks = Config.getInstance().getPurgeInterval() * 60L * 60L * Misc.TICK_CONVERSION_FACTOR; long purgeIntervalTicks = Config.getInstance().getPurgeInterval() * 60L * 60L * Misc.TICK_CONVERSION_FACTOR;
@ -657,10 +633,6 @@ 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, 60L * 60L * Misc.TICK_CONVERSION_FACTOR);
}
// Clear the registered XP data so players can earn XP again // Clear the registered XP data so players can earn XP again
if (ExperienceConfig.getInstance().getDiminishedReturnsEnabled()) { if (ExperienceConfig.getInstance().getDiminishedReturnsEnabled()) {
new ClearRegisteredXPGainTask().runTaskTimer(this, 60, 60); new ClearRegisteredXPGainTask().runTaskTimer(this, 60, 60);

View File

@ -1,23 +1,23 @@
package com.gmail.nossr50.runnables; //package com.gmail.nossr50.runnables;
//
import com.gmail.nossr50.mcMMO; //import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.runnables.skills.AprilTask; //import com.gmail.nossr50.runnables.skills.AprilTask;
import com.gmail.nossr50.util.Misc; //import com.gmail.nossr50.util.Misc;
import org.bukkit.scheduler.BukkitRunnable; //import org.bukkit.scheduler.BukkitRunnable;
//
public class CheckDateTask extends BukkitRunnable { //public class CheckDateTask extends BukkitRunnable {
//
@Override // @Override
public void run() { // public void run() {
if (!mcMMO.getHolidayManager().isAprilFirst()) { // if (!mcMMO.getHolidayManager().isAprilFirst()) {
return; // return;
} // }
//
// Set up jokes // // Set up jokes
new AprilTask().runTaskTimer(mcMMO.p, 60L * Misc.TICK_CONVERSION_FACTOR, 10L * 60L * Misc.TICK_CONVERSION_FACTOR); // new AprilTask().runTaskTimer(mcMMO.p, 60L * Misc.TICK_CONVERSION_FACTOR, 10L * 60L * Misc.TICK_CONVERSION_FACTOR);
mcMMO.getHolidayManager().registerAprilCommand(); // mcMMO.getHolidayManager().registerAprilCommand();
//
// Jokes deployed. // // Jokes deployed.
this.cancel(); // this.cancel();
} // }
} //}

View File

@ -1,56 +1,56 @@
package com.gmail.nossr50.runnables.skills; //package com.gmail.nossr50.runnables.skills;
//
import com.gmail.nossr50.mcMMO; //import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.HolidayManager; //import com.gmail.nossr50.util.HolidayManager;
import com.gmail.nossr50.util.Misc; //import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.sounds.SoundManager; //import com.gmail.nossr50.util.sounds.SoundManager;
import com.gmail.nossr50.util.sounds.SoundType; //import com.gmail.nossr50.util.sounds.SoundType;
import org.bukkit.ChatColor; //import org.bukkit.ChatColor;
import org.bukkit.Statistic; //import org.bukkit.Statistic;
import org.bukkit.entity.Player; //import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable; //import org.bukkit.scheduler.BukkitRunnable;
//
public class AprilTask extends BukkitRunnable { //public class AprilTask extends BukkitRunnable {
//
@Override // @Override
public void run() { // public void run() {
if (!mcMMO.getHolidayManager().isAprilFirst()) { // if (!mcMMO.getHolidayManager().isAprilFirst()) {
this.cancel(); // this.cancel();
return; // return;
} // }
//
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) { // for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
int random = Misc.getRandom().nextInt(40) + 11; // int random = Misc.getRandom().nextInt(40) + 11;
int betterRandom = Misc.getRandom().nextInt(2000); // int betterRandom = Misc.getRandom().nextInt(2000);
if (betterRandom == 0) { // if (betterRandom == 0) {
SoundManager.sendSound(player, player.getLocation(), SoundType.LEVEL_UP); // SoundManager.sendSound(player, player.getLocation(), SoundType.LEVEL_UP);
player.sendMessage(unknown("superskill") + " skill increased by 1. Total (" + unknown("12") + ")"); // player.sendMessage(unknown("superskill") + " skill increased by 1. Total (" + unknown("12") + ")");
// fireworksShow(player); //// fireworksShow(player);
} // }
//
for (Statistic statistic : mcMMO.getHolidayManager().movementStatistics) { // for (Statistic statistic : mcMMO.getHolidayManager().movementStatistics) {
if (player.getStatistic(statistic) > 0 && player.getStatistic(statistic) % random == 0) { // if (player.getStatistic(statistic) > 0 && player.getStatistic(statistic) % random == 0) {
mcMMO.getHolidayManager().levelUpApril(player, HolidayManager.FakeSkillType.getByStatistic(statistic)); // mcMMO.getHolidayManager().levelUpApril(player, HolidayManager.FakeSkillType.getByStatistic(statistic));
break; // break;
} // }
} // }
} // }
} // }
//
/*private void fireworksShow(final Player player) { // /*private void fireworksShow(final Player player) {
final int firework_amount = 10; // final int firework_amount = 10;
for (int i = 0; i < firework_amount; i++) { // for (int i = 0; i < firework_amount; i++) {
int delay = (int) (Misc.getRandom().nextDouble() * 3 * Misc.TICK_CONVERSION_FACTOR) + 4; // int delay = (int) (Misc.getRandom().nextDouble() * 3 * Misc.TICK_CONVERSION_FACTOR) + 4;
mcMMO.p.getServer().getScheduler().runTaskLater(mcMMO.p, new Runnable() { // mcMMO.p.getServer().getScheduler().runTaskLater(mcMMO.p, new Runnable() {
@Override // @Override
public void run() { // public void run() {
mcMMO.getHolidayManager().spawnFireworks(player); // mcMMO.getHolidayManager().spawnFireworks(player);
} // }
}, delay); // }, delay);
} // }
}*/ // }*/
//
private String unknown(String string) { // private String unknown(String string) {
return ChatColor.MAGIC + string + ChatColor.RESET + ChatColor.YELLOW; // return ChatColor.MAGIC + string + ChatColor.RESET + ChatColor.YELLOW;
} // }
} //}

View File

@ -1,214 +1,214 @@
package com.gmail.nossr50.runnables.skills; //package com.gmail.nossr50.runnables.skills;
//
import com.gmail.nossr50.config.AdvancedConfig; //import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.interactions.NotificationType; //import com.gmail.nossr50.datatypes.interactions.NotificationType;
import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent; //import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent;
import com.gmail.nossr50.mcMMO; //import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.MobHealthbarUtils; //import com.gmail.nossr50.util.MobHealthbarUtils;
import com.gmail.nossr50.util.player.NotificationManager; //import com.gmail.nossr50.util.player.NotificationManager;
import com.gmail.nossr50.util.skills.CombatUtils; //import com.gmail.nossr50.util.skills.CombatUtils;
import com.gmail.nossr50.util.skills.ParticleEffectUtils; //import com.gmail.nossr50.util.skills.ParticleEffectUtils;
import com.gmail.nossr50.util.sounds.SoundManager; //import com.gmail.nossr50.util.sounds.SoundManager;
import com.gmail.nossr50.util.sounds.SoundType; //import com.gmail.nossr50.util.sounds.SoundType;
import org.bukkit.Bukkit; //import org.bukkit.Bukkit;
import org.bukkit.entity.LivingEntity; //import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; //import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityDamageEvent; //import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.inventory.ItemStack; //import org.bukkit.inventory.ItemStack;
import org.bukkit.scheduler.BukkitRunnable; //import org.bukkit.scheduler.BukkitRunnable;
import org.jetbrains.annotations.NotNull; //import org.jetbrains.annotations.NotNull;
//
import java.util.HashMap; //import java.util.HashMap;
import java.util.Iterator; //import java.util.Iterator;
import java.util.Map; //import java.util.Map;
import java.util.Map.Entry; //import java.util.Map.Entry;
//
public class BleedTimerTask extends BukkitRunnable { //public class BleedTimerTask extends BukkitRunnable {
private static final @NotNull Map<LivingEntity, BleedContainer> bleedList = new HashMap<>(); // private static final @NotNull Map<LivingEntity, BleedContainer> bleedList = new HashMap<>();
private static boolean isIterating = false; // private static boolean isIterating = false;
//
@Override // @Override
public void run() { // public void run() {
isIterating = true; // isIterating = true;
Iterator<Entry<LivingEntity, BleedContainer>> bleedIterator = bleedList.entrySet().iterator(); // Iterator<Entry<LivingEntity, BleedContainer>> bleedIterator = bleedList.entrySet().iterator();
//
while (bleedIterator.hasNext()) { // while (bleedIterator.hasNext()) {
Entry<LivingEntity, BleedContainer> containerEntry = bleedIterator.next(); // Entry<LivingEntity, BleedContainer> containerEntry = bleedIterator.next();
LivingEntity target = containerEntry.getKey(); // LivingEntity target = containerEntry.getKey();
int toolTier = containerEntry.getValue().toolTier; // int toolTier = containerEntry.getValue().toolTier;
//
// String debugMessage = ""; //// String debugMessage = "";
// debugMessage += ChatColor.GOLD + "Target ["+target.getName()+"]: " + ChatColor.RESET; //// debugMessage += ChatColor.GOLD + "Target ["+target.getName()+"]: " + ChatColor.RESET;
//
// debugMessage+="RemainingTicks=["+containerEntry.getValue().bleedTicks+"], "; //// debugMessage+="RemainingTicks=["+containerEntry.getValue().bleedTicks+"], ";
//
if (containerEntry.getValue().bleedTicks <= 0 || !target.isValid()) { // if (containerEntry.getValue().bleedTicks <= 0 || !target.isValid()) {
if(target instanceof Player) // if(target instanceof Player)
{ // {
NotificationManager.sendPlayerInformation((Player) target, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding.Stopped"); // NotificationManager.sendPlayerInformation((Player) target, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding.Stopped");
} // }
//
bleedIterator.remove(); // bleedIterator.remove();
continue; // continue;
} // }
//
int armorCount = 0; // int armorCount = 0;
//
double damage; // double damage;
//
if (target instanceof Player) { // if (target instanceof Player) {
damage = AdvancedConfig.getInstance().getRuptureDamagePlayer(); // damage = AdvancedConfig.getInstance().getRuptureDamagePlayer();
//
//Above Bleed Rank 3 deals 50% more damage // //Above Bleed Rank 3 deals 50% more damage
if (containerEntry.getValue().toolTier >= 4 && containerEntry.getValue().bleedRank >= 3) // if (containerEntry.getValue().toolTier >= 4 && containerEntry.getValue().bleedRank >= 3)
damage = damage * 1.5; // damage = damage * 1.5;
//
Player player = (Player) target; // Player player = (Player) target;
//
if (!player.isOnline()) { // if (!player.isOnline()) {
continue; // continue;
} // }
//
//Count Armor // //Count Armor
for (ItemStack armorPiece : ((Player) target).getInventory().getArmorContents()) { // for (ItemStack armorPiece : ((Player) target).getInventory().getArmorContents()) {
//We only want to count slots that contain armor. // //We only want to count slots that contain armor.
if (armorPiece != null) { // if (armorPiece != null) {
armorCount++; // armorCount++;
} // }
} // }
//
} else { // } else {
damage = AdvancedConfig.getInstance().getRuptureDamageMobs(); // damage = AdvancedConfig.getInstance().getRuptureDamageMobs();
//
// debugMessage+="BaseDMG=["+damage+"], "; //// debugMessage+="BaseDMG=["+damage+"], ";
//
//Above Bleed Rank 3 deals 50% more damage // //Above Bleed Rank 3 deals 50% more damage
if (containerEntry.getValue().bleedRank >= 3) // if (containerEntry.getValue().bleedRank >= 3)
{ // {
damage = damage * 1.5; // damage = damage * 1.5;
} // }
//
// debugMessage+="Rank4Bonus=["+String.valueOf(containerEntry.getValue().bleedRank >= 3)+"], "; //// debugMessage+="Rank4Bonus=["+String.valueOf(containerEntry.getValue().bleedRank >= 3)+"], ";
//
//
MobHealthbarUtils.handleMobHealthbars(target, damage, mcMMO.p); //Update health bars // MobHealthbarUtils.handleMobHealthbars(target, damage, mcMMO.p); //Update health bars
} // }
//
// debugMessage+="FullArmor=["+String.valueOf(armorCount > 3)+"], "; //// debugMessage+="FullArmor=["+String.valueOf(armorCount > 3)+"], ";
//
if(armorCount > 3) // if(armorCount > 3)
{ // {
damage = damage * .75; // damage = damage * .75;
} // }
//
// debugMessage+="AfterRankAndArmorChecks["+damage+"], "; //// debugMessage+="AfterRankAndArmorChecks["+damage+"], ";
//
//Weapons below Diamond get damage cut in half // //Weapons below Diamond get damage cut in half
if(toolTier < 4) // if(toolTier < 4)
damage = damage / 2; // damage = damage / 2;
//
// debugMessage+="AfterDiamondCheck=["+String.valueOf(damage)+"], "; //// debugMessage+="AfterDiamondCheck=["+String.valueOf(damage)+"], ";
//
//Wood weapons get damage cut in half again // //Wood weapons get damage cut in half again
if(toolTier < 2) // if(toolTier < 2)
damage = damage / 2; // damage = damage / 2;
//
// debugMessage+="AfterWoodenCheck=["+String.valueOf(damage)+"], "; //// debugMessage+="AfterWoodenCheck=["+String.valueOf(damage)+"], ";
//
double victimHealth = target.getHealth(); // double victimHealth = target.getHealth();
//
// debugMessage+="TargetHealthBeforeDMG=["+String.valueOf(target.getHealth())+"], "; //// debugMessage+="TargetHealthBeforeDMG=["+String.valueOf(target.getHealth())+"], ";
//
//Fire a fake event // //Fire a fake event
FakeEntityDamageByEntityEvent fakeEntityDamageByEntityEvent = (FakeEntityDamageByEntityEvent) CombatUtils.sendEntityDamageEvent(containerEntry.getValue().damageSource, target, EntityDamageEvent.DamageCause.CUSTOM, damage); // FakeEntityDamageByEntityEvent fakeEntityDamageByEntityEvent = (FakeEntityDamageByEntityEvent) CombatUtils.sendEntityDamageEvent(containerEntry.getValue().damageSource, target, EntityDamageEvent.DamageCause.CUSTOM, damage);
Bukkit.getPluginManager().callEvent(fakeEntityDamageByEntityEvent); // Bukkit.getPluginManager().callEvent(fakeEntityDamageByEntityEvent);
//
CombatUtils.dealNoInvulnerabilityTickDamageRupture(target, damage, containerEntry.getValue().damageSource, toolTier); // CombatUtils.dealNoInvulnerabilityTickDamageRupture(target, damage, containerEntry.getValue().damageSource, toolTier);
//
double victimHealthAftermath = target.getHealth(); // double victimHealthAftermath = target.getHealth();
//
// debugMessage+="TargetHealthAfterDMG=["+String.valueOf(target.getHealth())+"], "; //// debugMessage+="TargetHealthAfterDMG=["+String.valueOf(target.getHealth())+"], ";
//
if(victimHealthAftermath <= 0 || victimHealth != victimHealthAftermath) // if(victimHealthAftermath <= 0 || victimHealth != victimHealthAftermath)
{ // {
//Play Bleed Sound // //Play Bleed Sound
SoundManager.worldSendSound(target.getWorld(), target.getLocation(), SoundType.BLEED); // SoundManager.worldSendSound(target.getWorld(), target.getLocation(), SoundType.BLEED);
//
ParticleEffectUtils.playBleedEffect(target); // ParticleEffectUtils.playBleedEffect(target);
} // }
//
//Lower Bleed Ticks // //Lower Bleed Ticks
BleedContainer loweredBleedContainer = copyContainer(containerEntry.getValue()); // BleedContainer loweredBleedContainer = copyContainer(containerEntry.getValue());
loweredBleedContainer.bleedTicks -= 1; // loweredBleedContainer.bleedTicks -= 1;
//
// debugMessage+="RemainingTicks=["+loweredBleedContainer.bleedTicks+"]"; //// debugMessage+="RemainingTicks=["+loweredBleedContainer.bleedTicks+"]";
containerEntry.setValue(loweredBleedContainer); // containerEntry.setValue(loweredBleedContainer);
//
// Bukkit.broadcastMessage(debugMessage); //// Bukkit.broadcastMessage(debugMessage);
} // }
isIterating = false; // isIterating = false;
} // }
//
public static @NotNull BleedContainer copyContainer(@NotNull BleedContainer container) // public static @NotNull BleedContainer copyContainer(@NotNull BleedContainer container)
{ // {
LivingEntity target = container.target; // LivingEntity target = container.target;
LivingEntity source = container.damageSource; // LivingEntity source = container.damageSource;
int bleedTicks = container.bleedTicks; // int bleedTicks = container.bleedTicks;
int bleedRank = container.bleedRank; // int bleedRank = container.bleedRank;
int toolTier = container.toolTier; // int toolTier = container.toolTier;
//
return new BleedContainer(target, bleedTicks, bleedRank, toolTier, source); // return new BleedContainer(target, bleedTicks, bleedRank, toolTier, source);
} // }
//
/** // /**
* Instantly Bleed out a LivingEntity // * Instantly Bleed out a LivingEntity
* // *
* @param entity LivingEntity to bleed out // * @param entity LivingEntity to bleed out
*/ // */
public static void bleedOut(@NotNull LivingEntity entity) { // public static void bleedOut(@NotNull LivingEntity entity) {
/* // /*
* Don't remove anything from the list outside of run() // * Don't remove anything from the list outside of run()
*/ // */
//
if (bleedList.containsKey(entity)) { // if (bleedList.containsKey(entity)) {
CombatUtils.dealNoInvulnerabilityTickDamage(entity, bleedList.get(entity).bleedTicks * 2, bleedList.get(entity).damageSource); // CombatUtils.dealNoInvulnerabilityTickDamage(entity, bleedList.get(entity).bleedTicks * 2, bleedList.get(entity).damageSource);
} // }
} // }
//
/** // /**
* Add a LivingEntity to the bleedList if it is not in it. // * Add a LivingEntity to the bleedList if it is not in it.
* // *
* @param entity LivingEntity to add // * @param entity LivingEntity to add
* @param attacker source of the bleed/rupture // * @param attacker source of the bleed/rupture
* @param ticks Number of bleeding ticks // * @param ticks Number of bleeding ticks
*/ // */
public static void add(@NotNull LivingEntity entity, @NotNull LivingEntity attacker, int ticks, int bleedRank, int toolTier) { // public static void add(@NotNull LivingEntity entity, @NotNull LivingEntity attacker, int ticks, int bleedRank, int toolTier) {
if (!Bukkit.isPrimaryThread()) { // if (!Bukkit.isPrimaryThread()) {
throw new IllegalStateException("Cannot add bleed task async!"); // throw new IllegalStateException("Cannot add bleed task async!");
} // }
//
if(isIterating) { // if(isIterating) {
//Used to throw an error here, but in reality all we are really doing is preventing concurrency issues from other plugins being naughty and its not really needed // //Used to throw an error here, but in reality all we are really doing is preventing concurrency issues from other plugins being naughty and its not really needed
//I'm not really a fan of silent errors, but I'm sick of seeing people using crazy enchantments come in and report this "bug" // //I'm not really a fan of silent errors, but I'm sick of seeing people using crazy enchantments come in and report this "bug"
return; // return;
} // }
//
// if (isIterating) throw new IllegalStateException("Cannot add task while iterating timers!"); //// if (isIterating) throw new IllegalStateException("Cannot add task while iterating timers!");
//
if(toolTier < 4) // if(toolTier < 4)
ticks = Math.max(1, (ticks / 3)); // ticks = Math.max(1, (ticks / 3));
//
ticks+=1; // ticks+=1;
//
BleedContainer newBleedContainer = new BleedContainer(entity, ticks, bleedRank, toolTier, attacker); // BleedContainer newBleedContainer = new BleedContainer(entity, ticks, bleedRank, toolTier, attacker);
bleedList.put(entity, newBleedContainer); // bleedList.put(entity, newBleedContainer);
} // }
//
public static boolean isBleedOperationAllowed() { // public static boolean isBleedOperationAllowed() {
return !isIterating && Bukkit.isPrimaryThread(); // return !isIterating && Bukkit.isPrimaryThread();
} // }
//
public static boolean isBleeding(@NotNull LivingEntity entity) { // public static boolean isBleeding(@NotNull LivingEntity entity) {
return bleedList.containsKey(entity); // return bleedList.containsKey(entity);
} // }
} //}

View File

@ -0,0 +1,137 @@
package com.gmail.nossr50.runnables.skills;
import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.MobHealthbarUtils;
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
import com.google.common.base.Objects;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.scheduler.BukkitRunnable;
import org.jetbrains.annotations.NotNull;
public class RuptureTask extends BukkitRunnable {
public static final int DAMAGE_TICK_INTERVAL = 10;
private final @NotNull McMMOPlayer ruptureSource;
private final @NotNull LivingEntity targetEntity;
private final int expireTick;
private int ruptureTick;
private int damageTickTracker;
private final double pureTickDamage; //TODO: Make configurable
private final double explosionDamage; //TODO: Make configurable
public RuptureTask(@NotNull McMMOPlayer ruptureSource, @NotNull LivingEntity targetEntity, double pureTickDamage, double explosionDamage) {
this.ruptureSource = ruptureSource;
this.targetEntity = targetEntity;
this.expireTick = AdvancedConfig.getInstance().getRuptureDurationSeconds(targetEntity instanceof Player) * 20;
this.ruptureTick = 0;
this.damageTickTracker = 0;
this.pureTickDamage = pureTickDamage;
this.explosionDamage = explosionDamage;
}
@Override
public void run() {
//Check validity
if(targetEntity.isValid()) {
ruptureTick += 1; //Advance rupture tick by 1.
damageTickTracker += 1; //Increment damage tick tracker
//Rupture hasn't ended yet
if(ruptureTick < expireTick) {
//Is it time to damage?
if(damageTickTracker >= DAMAGE_TICK_INTERVAL) {
damageTickTracker = 0; //Reset
ParticleEffectUtils.playBleedEffect(targetEntity); //Animate
if(targetEntity.getHealth() > 0.01) {
double healthBeforeRuptureIsApplied = targetEntity.getHealth();
double damagedHealth = healthBeforeRuptureIsApplied - calculateAdjustedTickDamage();
if(damagedHealth <= 0) {
mcMMO.p.getLogger().severe("DEBUG: Miscalculating Rupture tick damage");
} else {
targetEntity.setHealth(damagedHealth); //Hurt entity without the unwanted side effects of damage()
}
}
}
} else {
explode();
}
} else {
targetEntity.removeMetadata(mcMMO.RUPTURE_META_KEY, mcMMO.p);
this.cancel(); //Task no longer needed
}
}
public void refreshRupture() {
damageTickTracker = DAMAGE_TICK_INTERVAL;
ruptureTick = 0;
}
public void explode() {
targetEntity.setMetadata(mcMMO.EXPLOSION_FROM_RUPTURE, new FixedMetadataValue(mcMMO.p, "null"));
ParticleEffectUtils.playGreaterImpactEffect(targetEntity); //Animate
if(ruptureSource.getPlayer() != null && ruptureSource.getPlayer().isValid()) {
targetEntity.damage(getExplosionDamage(), ruptureSource.getPlayer());
} else {
targetEntity.damage(getExplosionDamage(), null);
}
targetEntity.removeMetadata(mcMMO.RUPTURE_META_KEY, mcMMO.p);
this.cancel(); //Task no longer needed
}
private double calculateAdjustedTickDamage() {
double tickDamage = pureTickDamage;
if(targetEntity.getHealth() <= tickDamage) {
tickDamage = targetEntity.getHealth() - 0.01;
if(tickDamage <= 0) {
tickDamage = 0;
}
}
return tickDamage;
}
private double getExplosionDamage() {
return explosionDamage;
}
@Override
public String toString() {
return "RuptureTask{" +
"ruptureSource=" + ruptureSource +
", targetEntity=" + targetEntity +
", expireTick=" + expireTick +
", ruptureTick=" + ruptureTick +
", damageTickTracker=" + damageTickTracker +
", pureTickDamage=" + pureTickDamage +
", explosionDamage=" + explosionDamage +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RuptureTask that = (RuptureTask) o;
return expireTick == that.expireTick && ruptureTick == that.ruptureTick && damageTickTracker == that.damageTickTracker && Double.compare(that.pureTickDamage, pureTickDamage) == 0 && Double.compare(that.explosionDamage, explosionDamage) == 0 && Objects.equal(ruptureSource, that.ruptureSource) && Objects.equal(targetEntity, that.targetEntity);
}
@Override
public int hashCode() {
return Objects.hashCode(ruptureSource, targetEntity, expireTick, ruptureTick, damageTickTracker, pureTickDamage, explosionDamage);
}
}

View File

@ -198,7 +198,7 @@ public class FishingManager extends SkillManager {
} }
public double getShakeChance() { public double getShakeChance() {
return AdvancedConfig.getInstance().getShakeChance(getLootTier()); return AdvancedConfig.getInstance().getShakeChance(RankUtils.getRank(mmoPlayer.getPlayer(), SubSkillType.FISHING_SHAKE));
} }
protected int getVanillaXPBoostModifier() { protected int getVanillaXPBoostModifier() {

View File

@ -38,6 +38,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory; import org.bukkit.inventory.PlayerInventory;
import org.bukkit.scheduler.BukkitRunnable;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.ArrayList; import java.util.ArrayList;
@ -109,22 +110,41 @@ public class HerbalismManager extends SkillManager {
mmoPlayer.getPlayer().sendMessage("Bush XP: " + xpReward); mmoPlayer.getPlayer().sendMessage("Bush XP: " + xpReward);
} }
// //Check for double drops CheckBushAge checkBushAge = new CheckBushAge(blockState.getBlock(), mmoPlayer, xpReward);
// if(checkDoubleDrop(blockState)) { checkBushAge.runTaskLater(mcMMO.p, 1);
//
// if(mmoPlayer.isDebugMode()) {
// mmoPlayer.getPlayer().sendMessage("Double Drops succeeded for Berry Bush");
// }
//
// //Add metadata to mark this block for double or triple drops
// markForBonusDrops(blockState);
// }
applyXpGain(xpReward, XPGainReason.PVE, XPGainSource.SELF);
} }
} }
} }
private class CheckBushAge extends BukkitRunnable {
@NotNull Block block;
@NotNull McMMOPlayer mmoPlayer;
int xpReward;
public CheckBushAge(@NotNull Block block, @NotNull McMMOPlayer mmoPlayer, int xpReward) {
this.block = block;
this.mmoPlayer = mmoPlayer;
this.xpReward = xpReward;
}
@Override
public void run() {
BlockState blockState = block.getState();
if(blockState.getType().toString().equalsIgnoreCase("sweet_berry_bush")) {
if(blockState.getBlockData() instanceof Ageable) {
Ageable ageable = (Ageable) blockState.getBlockData();
if(ageable.getAge() <= 1) {
applyXpGain(xpReward, XPGainReason.PVE, XPGainSource.SELF);
}
}
}
}
}
public boolean canUseHylianLuck() { public boolean canUseHylianLuck() {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.HERBALISM_HYLIAN_LUCK)) if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.HERBALISM_HYLIAN_LUCK))
return false; return false;

View File

@ -3,8 +3,6 @@ package com.gmail.nossr50.skills.swords;
import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.AdvancedConfig;
public class Swords { public class Swords {
public static int bleedMaxTicks = AdvancedConfig.getInstance().getRuptureMaxTicks();
public static double counterAttackModifier = AdvancedConfig.getInstance().getCounterModifier(); public static double counterAttackModifier = AdvancedConfig.getInstance().getCounterModifier();
public static double serratedStrikesModifier = AdvancedConfig.getInstance().getSerratedStrikesModifier(); public static double serratedStrikesModifier = AdvancedConfig.getInstance().getSerratedStrikesModifier();

View File

@ -1,11 +1,14 @@
package com.gmail.nossr50.skills.swords; package com.gmail.nossr50.skills.swords;
import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.interactions.NotificationType; import com.gmail.nossr50.datatypes.interactions.NotificationType;
import com.gmail.nossr50.datatypes.meta.RuptureTaskMeta;
import com.gmail.nossr50.datatypes.skills.AbilityToolType; import com.gmail.nossr50.datatypes.skills.AbilityToolType;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.datatypes.skills.SuperAbilityType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
import com.gmail.nossr50.runnables.skills.BleedTimerTask; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.runnables.skills.RuptureTask;
import com.gmail.nossr50.skills.SkillManager; import com.gmail.nossr50.skills.SkillManager;
import com.gmail.nossr50.util.ItemUtils; import com.gmail.nossr50.util.ItemUtils;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
@ -60,32 +63,52 @@ public class SwordsManager extends SkillManager {
* *
* @param target The defending entity * @param target The defending entity
*/ */
public void ruptureCheck(@NotNull LivingEntity target) throws IllegalStateException { public void processRupture(@NotNull LivingEntity target) {
if(BleedTimerTask.isBleedOperationAllowed()) { if(target.hasMetadata(mcMMO.RUPTURE_META_KEY)) {
if (RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.SWORDS_RUPTURE, getPlayer())) { RuptureTaskMeta ruptureTaskMeta = (RuptureTaskMeta) target.getMetadata(mcMMO.RUPTURE_META_KEY).get(0);
if (target instanceof Player) { if(mmoPlayer.isDebugMode()) {
Player defender = (Player) target; mmoPlayer.getPlayer().sendMessage("Rupture task ongoing for target " + target.toString());
mmoPlayer.getPlayer().sendMessage(ruptureTaskMeta.getRuptureTimerTask().toString());
}
//Don't start or add to a bleed if they are blocking ruptureTaskMeta.getRuptureTimerTask().refreshRupture();
if(defender.isBlocking()) return; //Don't apply bleed
return; }
if (NotificationManager.doesPlayerUseNotifications(defender)) { if (RandomChanceUtil.rollDice(AdvancedConfig.getInstance().getRuptureChanceToApplyOnHit(getRuptureRank()), 100)) {
if(!BleedTimerTask.isBleeding(defender))
NotificationManager.sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding.Started");
}
}
BleedTimerTask.add(target, getPlayer(), getRuptureBleedTicks(), RankUtils.getRank(getPlayer(), SubSkillType.SWORDS_RUPTURE), getToolTier(getPlayer().getInventory().getItemInMainHand())); if (target instanceof Player) {
Player defender = (Player) target;
if (mmoPlayer.hasSkillChatNotifications()) { //Don't start or add to a bleed if they are blocking
NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding"); if(defender.isBlocking())
return;
if (NotificationManager.doesPlayerUseNotifications(defender)) {
NotificationManager.sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding.Started");
} }
} }
RuptureTask ruptureTask = new RuptureTask(mmoPlayer, target,
AdvancedConfig.getInstance().getRuptureTickDamage(target instanceof Player, getRuptureRank()),
AdvancedConfig.getInstance().getRuptureExplosionDamage(target instanceof Player, getRuptureRank()));
RuptureTaskMeta ruptureTaskMeta = new RuptureTaskMeta(mcMMO.p, ruptureTask);
ruptureTask.runTaskTimer(mcMMO.p, 0, 1);
target.setMetadata(mcMMO.RUPTURE_META_KEY, ruptureTaskMeta);
// if (mmoPlayer.hasSkillChatNotifications()) {
// NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding");
// }
} }
} }
private int getRuptureRank() {
return RankUtils.getRank(getPlayer(), SubSkillType.SWORDS_RUPTURE);
}
public double getStabDamage() public double getStabDamage()
{ {
int rank = RankUtils.getRank(getPlayer(), SubSkillType.SWORDS_STAB); int rank = RankUtils.getRank(getPlayer(), SubSkillType.SWORDS_STAB);
@ -112,14 +135,8 @@ public class SwordsManager extends SkillManager {
return 1; return 1;
} }
public int getRuptureBleedTicks() public int getRuptureBleedTicks(boolean isTargetPlayer) {
{ return AdvancedConfig.getInstance().getRuptureDurationSeconds(isTargetPlayer) / RuptureTask.DAMAGE_TICK_INTERVAL;
int bleedTicks = 2 * RankUtils.getRank(mmoPlayer, SubSkillType.SWORDS_RUPTURE);
if(bleedTicks > Swords.bleedMaxTicks)
bleedTicks = Swords.bleedMaxTicks;
return bleedTicks;
} }
/** /**

View File

@ -10,7 +10,6 @@ import com.gmail.nossr50.datatypes.skills.subskills.taming.CallOfTheWildType;
import com.gmail.nossr50.datatypes.skills.subskills.taming.TamingSummon; import com.gmail.nossr50.datatypes.skills.subskills.taming.TamingSummon;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
import com.gmail.nossr50.skills.SkillManager; import com.gmail.nossr50.skills.SkillManager;
import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
@ -167,21 +166,13 @@ public class TamingManager extends SkillManager {
* @param damage The initial damage * @param damage The initial damage
*/ */
public double gore(@NotNull LivingEntity target, double damage) { public double gore(@NotNull LivingEntity target, double damage) {
if(BleedTimerTask.isBleedOperationAllowed()) { // if (target instanceof Player) {
if (!RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.TAMING_GORE, getPlayer())) { // NotificationManager.sendPlayerInformation((Player)target, NotificationType.SUBSKILL_MESSAGE, "Combat.StruckByGore");
return 0; // }
} //
// NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Combat.Gore");
BleedTimerTask.add(target, getPlayer(), Taming.goreBleedTicks, 1, 2); damage = (damage * Taming.goreModifier) - damage;
if (target instanceof Player) {
NotificationManager.sendPlayerInformation((Player)target, NotificationType.SUBSKILL_MESSAGE, "Combat.StruckByGore");
}
NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Combat.Gore");
damage = (damage * Taming.goreModifier) - damage;
}
return damage; return damage;
} }

View File

@ -1,387 +1,388 @@
package com.gmail.nossr50.util; //package com.gmail.nossr50.util;
import com.gmail.nossr50.commands.skills.AprilCommand;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.interactions.NotificationType;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.player.NotificationManager;
import com.gmail.nossr50.util.sounds.SoundManager;
import com.gmail.nossr50.util.sounds.SoundType;
import com.gmail.nossr50.util.text.StringUtils;
import com.google.common.collect.ImmutableList;
import com.neetgames.mcmmo.player.OnlineMMOPlayer;
import org.bukkit.ChatColor;
import org.bukkit.Color;
import org.bukkit.Statistic;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerStatisticIncrementEvent;
import java.io.*;
import java.util.*;
import java.util.regex.Pattern;
public final class HolidayManager {
private final ArrayList<String> hasCelebrated;
private final int currentYear;
private static final int START_YEAR = 2011;
private static final List<Color> ALL_COLORS;
private static final List<ChatColor> ALL_CHAT_COLORS;
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 WALK_UNDER_WATER_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.WALK_UNDER_WATER_ONE_CM,
Statistic.PIG_ONE_CM);
static {
List<Color> colors = new ArrayList<>();
List<ChatColor> chatColors = new ArrayList<>();
List<ChatColor> chatFormats = new ArrayList<>();
for (ChatColor color : ChatColor.values()) {
if (color.isColor()) {
chatColors.add(color);
}
else {
chatFormats.add(color);
}
}
// for (DyeColor color : DyeColor.values()) {
// colors.add(color.getFireworkColor());
// }
Collections.shuffle(chatColors, Misc.getRandom());
Collections.shuffle(colors, Misc.getRandom());
Collections.shuffle(chatFormats, Misc.getRandom());
ALL_CHAT_COLORS = ImmutableList.copyOf(chatColors);
ALL_COLORS = ImmutableList.copyOf(colors);
CHAT_FORMATS = ImmutableList.copyOf(chatFormats);
}
// This gets called onEnable
public HolidayManager() {
currentYear = Calendar.getInstance().get(Calendar.YEAR);
File anniversaryFile = new File(mcMMO.getFlatFileDirectory(), "anniversary." + currentYear + ".yml");
if (!anniversaryFile.exists()) {
try {
anniversaryFile.createNewFile();
}
catch (IOException ex) {
mcMMO.p.getLogger().severe(ex.toString());
}
}
hasCelebrated = new ArrayList<>();
try {
hasCelebrated.clear();
BufferedReader reader = new BufferedReader(new FileReader(anniversaryFile.getPath()));
String line = reader.readLine();
while (line != null) {
hasCelebrated.add(line);
line = reader.readLine();
}
reader.close();
}
catch (Exception ex) {
mcMMO.p.getLogger().severe(ex.toString());
}
cleanupFiles();
}
private void cleanupFiles() {
File FlatFileDir = new File(mcMMO.getFlatFileDirectory());
File legacy = new File(FlatFileDir, "anniversary.yml");
List<File> toDelete = new ArrayList<>();
if (legacy.exists()) {
toDelete.add(legacy);
}
Pattern pattern = Pattern.compile("anniversary\\.(?:.+)\\.yml");
for (String fileName : FlatFileDir.list()) {
if (!pattern.matcher(fileName).matches() || fileName.equals("anniversary." + currentYear + ".yml")) {
continue;
}
File file = new File(FlatFileDir, fileName);
if (file.isDirectory()) {
continue;
}
toDelete.add(file);
}
for (File file : toDelete) {
if (file.delete()) {
mcMMO.p.debug("Deleted: " + file.getName());
}
}
}
// This gets called onDisable
public void saveAnniversaryFiles() {
mcMMO.p.debug("Saving anniversary files...");
String anniversaryFilePath = mcMMO.getFlatFileDirectory() + "anniversary." + currentYear + ".yml";
try {
BufferedWriter writer = new BufferedWriter(new FileWriter(anniversaryFilePath));
for (String player : hasCelebrated) {
writer.write(player);
writer.newLine();
}
writer.close();
}
catch (Exception ex) {
mcMMO.p.getLogger().severe(ex.toString());
}
}
// This gets called from /mcmmo command
public void anniversaryCheck(final CommandSender sender) {
GregorianCalendar anniversaryStart = new GregorianCalendar(currentYear, Calendar.FEBRUARY, 3);
GregorianCalendar anniversaryEnd = new GregorianCalendar(currentYear, Calendar.FEBRUARY, 6);
GregorianCalendar day = new GregorianCalendar();
if (hasCelebrated.contains(sender.getName())) {
return;
}
if (!getDateRange(day.getTime(), anniversaryStart.getTime(), anniversaryEnd.getTime())) {
return;
}
sender.sendMessage(LocaleLoader.getString("Holiday.Anniversary", (currentYear - START_YEAR)));
/*if (sender instanceof 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() {
spawnFireworks((Player) sender);
}
}, delay);
}
}*/
// else {
/*
* Credit: http://www.geocities.com/spunk1111/
* (good luck finding that in 3 years heh)
* .''. . *''* :_\/_: .
* :_\/_: _\(/_ .:.*_\/_* : /\ : .'.:.'.
* .''.: /\ : /)\ ':'* /\ * : '..'. -=:o:=-
* :_\/_:'.:::. ' *''* * '.\'/.'_\(/_ '.':'.'
* : /\ : ::::: *_\/_* -= o =- /)\ '
* '..' ':::' * /\ * .'/.\'. ' *
* * *..* : *
* * * *
* * * *
*/
/*
* Color map
* AAAA D GGGG JJJJJJ K
* AAAAAA DDDDD EEEGGGGGG JJJJJJ KKKKKKK
* BBBBAAAAAA DDD EEEGGGGGG I JJJJJ KKKKKKK
* BBBBBBACCCCC D FFFF G IIIIIIIHHHHH KKKKKKK
* BBBBBB CCCCC FFFFFF IIIIIII HHH K
* BBBB CCCCC FFFFFF IIIIIII H k
* b FFFF I k
* b i k
* b i k
*/
Object[] colorParams = new Object[]{chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose()};
sender.sendMessage(String.format(" %1$s.''. %4$s. %7$s*''* %10$s:_\\/_: %11$s.", colorParams));
sender.sendMessage(String.format(" %1$s:_\\/_: %4$s_\\(/_ %5$s.:.%7$s*_\\/_* %10$s: /\\ : %11$s.'.:.'.", colorParams));
sender.sendMessage(String.format(" %2$s.''.%1$s: /\\ : %4$s/)\\ %5$s':'%7$s* /\\ * %9$s: %10$s'..'. %11$s-=:o:=-", colorParams));
sender.sendMessage(String.format("%2$s:_\\/_:%1$s'%3$s.:::. %4$s' %6$s*''* %7$s* %9$s'.\\'/.'%8$s_\\(/_ %11$s'.':'.'", colorParams));
sender.sendMessage(String.format("%2$s: /\\ : %3$s::::: %6$s*_\\/_* %9$s-= o =-%8$s /)\\ %11$s'", colorParams));
sender.sendMessage(String.format(" %2$s'..' %3$s':::' %6$s* /\\ * %9$s.'/.\\'. %8$s' %11$s*", colorParams));
sender.sendMessage(String.format(" %2$s* %6$s*..* %9$s: %11$s*", colorParams));
sender.sendMessage(String.format(" %2$s* %9$s* %11$s*", colorParams));
sender.sendMessage(String.format(" %2$s* %9$s* %11$s*", colorParams));
// }
hasCelebrated.add(sender.getName());
}
public boolean getDateRange(Date date, Date start, Date end) {
return !(date.before(start) || date.after(end));
}
// public void spawnFireworks(Player player) {
// int power = Misc.getRandom().nextInt(3) + 1;
// Type fireworkType = Type.values()[Misc.getRandom().nextInt(Type.values().length)];
// double varX = Misc.getRandom().nextGaussian() * 3;
// double varZ = Misc.getRandom().nextGaussian() * 3;
// //
// Firework fireworks = (Firework) player.getWorld().spawnEntity(player.getLocation().add(varX, 0, varZ), EntityType.FIREWORK); //import com.gmail.nossr50.commands.skills.AprilCommand;
// FireworkMeta fireworkmeta = fireworks.getFireworkMeta(); //import com.gmail.nossr50.config.Config;
// FireworkEffect effect = FireworkEffect.builder().flicker(Misc.getRandom().nextBoolean()).withColor(colorChoose()).withFade(colorChoose()).with(fireworkType).trail(Misc.getRandom().nextBoolean()).build(); //import com.gmail.nossr50.datatypes.interactions.NotificationType;
// fireworkmeta.addEffect(effect); //import com.gmail.nossr50.datatypes.player.McMMOPlayer;
// fireworkmeta.setPower(power); //import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
// fireworks.setFireworkMeta(fireworkmeta); //import com.gmail.nossr50.locale.LocaleLoader;
//import com.gmail.nossr50.mcMMO;
//import com.gmail.nossr50.util.player.NotificationManager;
//import com.gmail.nossr50.util.player.UserManager;
//import com.gmail.nossr50.util.sounds.SoundManager;
//import com.gmail.nossr50.util.sounds.SoundType;
//import com.gmail.nossr50.util.text.StringUtils;
//import com.google.common.collect.ImmutableList;
//import org.bukkit.ChatColor;
//import org.bukkit.Color;
//import org.bukkit.Statistic;
//import org.bukkit.command.CommandSender;
//import org.bukkit.command.PluginCommand;
//import org.bukkit.entity.Player;
//import org.bukkit.event.player.PlayerStatisticIncrementEvent;
//
//import java.io.*;
//import java.util.*;
//import java.util.regex.Pattern;
//
//public final class HolidayManager {
// private final ArrayList<String> hasCelebrated;
// private final int currentYear;
// private static final int START_YEAR = 2011;
//
// private static final List<Color> ALL_COLORS;
// private static final List<ChatColor> ALL_CHAT_COLORS;
// 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 WALK_UNDER_WATER_ONE_CM:
// return FakeSkillType.DIVING;
// case PIG_ONE_CM:
// return FakeSkillType.PIGGY;
// default:
// return FakeSkillType.UNKNOWN;
// }
// }
// } // }
//
private static List<Color> colorChoose() { // public final Set<Statistic> movementStatistics = EnumSet.of(
return ALL_COLORS.subList(0, Math.max(Misc.getRandom().nextInt(ALL_COLORS.size() + 1), 1)); // Statistic.WALK_ONE_CM, Statistic.SWIM_ONE_CM, Statistic.FALL_ONE_CM,
} // Statistic.CLIMB_ONE_CM, Statistic.FLY_ONE_CM, Statistic.WALK_UNDER_WATER_ONE_CM,
// Statistic.PIG_ONE_CM);
private static String chatColorChoose() { //
StringBuilder ret = new StringBuilder(ALL_CHAT_COLORS.get(Misc.getRandom().nextInt(ALL_CHAT_COLORS.size())).toString()); // static {
// List<Color> colors = new ArrayList<>();
for (ChatColor chatFormat : CHAT_FORMATS) { // List<ChatColor> chatColors = new ArrayList<>();
if (Misc.getRandom().nextInt(CHAT_FORMATS.size()) == 0) { // List<ChatColor> chatFormats = new ArrayList<>();
ret.append(chatFormat); //
} // for (ChatColor color : ChatColor.values()) {
} // if (color.isColor()) {
// chatColors.add(color);
return ret.toString(); // }
} // else {
// chatFormats.add(color);
public boolean isAprilFirst() { // }
if(!Config.getInstance().isAprilFoolsAllowed()) // }
return false; //
//// for (DyeColor color : DyeColor.values()) {
GregorianCalendar aprilFirst = new GregorianCalendar(currentYear, Calendar.APRIL, 1); //// colors.add(color.getFireworkColor());
GregorianCalendar aprilSecond = new GregorianCalendar(currentYear, Calendar.APRIL, 2); //// }
GregorianCalendar day = new GregorianCalendar(); //
return getDateRange(day.getTime(), aprilFirst.getTime(), aprilSecond.getTime()); // Collections.shuffle(chatColors, Misc.getRandom());
} // Collections.shuffle(colors, Misc.getRandom());
// Collections.shuffle(chatFormats, Misc.getRandom());
public boolean nearingAprilFirst() { //
if(!Config.getInstance().isAprilFoolsAllowed()) // ALL_CHAT_COLORS = ImmutableList.copyOf(chatColors);
return false; // ALL_COLORS = ImmutableList.copyOf(colors);
// CHAT_FORMATS = ImmutableList.copyOf(chatFormats);
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(); // // This gets called onEnable
// public HolidayManager() {
return mcMMO.getHolidayManager().getDateRange(day.getTime(), start.getTime(), end.getTime()); // currentYear = Calendar.getInstance().get(Calendar.YEAR);
} //
// File anniversaryFile = new File(mcMMO.getFlatFileDirectory(), "anniversary." + currentYear + ".yml");
public void handleStatisticEvent(PlayerStatisticIncrementEvent event) { //
Player player = event.getPlayer(); // if (!anniversaryFile.exists()) {
Statistic statistic = event.getStatistic(); // try {
int newValue = event.getNewValue(); // anniversaryFile.createNewFile();
// }
int modifier; // catch (IOException ex) {
switch (statistic) { // mcMMO.p.getLogger().severe(ex.toString());
case DAMAGE_TAKEN: // }
modifier = 500; // }
break; //
case JUMP: // hasCelebrated = new ArrayList<>();
modifier = 500; //
break; // try {
case DROP: // hasCelebrated.clear();
modifier = 200; // BufferedReader reader = new BufferedReader(new FileReader(anniversaryFile.getPath()));
break; // String line = reader.readLine();
case MINE_BLOCK: //
case BREAK_ITEM: // while (line != null) {
modifier = 500; // hasCelebrated.add(line);
break; // line = reader.readLine();
case CRAFT_ITEM: // }
modifier = 100; //
break; // reader.close();
default: // }
return; // catch (Exception ex) {
} // mcMMO.p.getLogger().severe(ex.toString());
// }
if (newValue % modifier == 0) { //
mcMMO.getHolidayManager().levelUpApril(player, FakeSkillType.getByStatistic(statistic)); // cleanupFiles();
} // }
} //
// private void cleanupFiles() {
public void levelUpApril(Player player, FakeSkillType fakeSkillType) { // File FlatFileDir = new File(mcMMO.getFlatFileDirectory());
if(!Config.getInstance().isAprilFoolsAllowed()) // File legacy = new File(FlatFileDir, "anniversary.yml");
return; // List<File> toDelete = new ArrayList<>();
//
final OnlineMMOPlayer mmoPlayer = UserManager.queryPlayer(player); // if (legacy.exists()) {
if (mmoPlayer == null) return; // toDelete.add(legacy);
// }
int levelTotal = Misc.getRandom().nextInt(1 + mmoPlayer.getSkillLevel(PrimarySkillType.MINING)) + 1; //
SoundManager.sendSound(player, player.getLocation(), SoundType.LEVEL_UP); // Pattern pattern = Pattern.compile("anniversary\\.(?:.+)\\.yml");
NotificationManager.sendPlayerInformation(player, NotificationType.HOLIDAY, "Holiday.AprilFools.Levelup", StringUtils.getCapitalized(fakeSkillType.toString()), String.valueOf(levelTotal)); //
// ParticleEffectUtils.fireworkParticleShower(player, ALL_COLORS.get(Misc.getRandom().nextInt(ALL_COLORS.size()))); // for (String fileName : FlatFileDir.list()) {
} // if (!pattern.matcher(fileName).matches() || fileName.equals("anniversary." + currentYear + ".yml")) {
// continue;
public void registerAprilCommand() { // }
if(!Config.getInstance().isAprilFoolsAllowed()) //
return; // File file = new File(FlatFileDir, fileName);
//
PluginCommand command = mcMMO.p.getCommand("crafting"); // if (file.isDirectory()) {
command.setExecutor(new AprilCommand()); // continue;
} // }
} //
// toDelete.add(file);
// }
//
// for (File file : toDelete) {
// if (file.delete()) {
// mcMMO.p.debug("Deleted: " + file.getName());
// }
// }
// }
//
// // This gets called onDisable
// public void saveAnniversaryFiles() {
// mcMMO.p.debug("Saving anniversary files...");
// String anniversaryFilePath = mcMMO.getFlatFileDirectory() + "anniversary." + currentYear + ".yml";
//
// try {
// BufferedWriter writer = new BufferedWriter(new FileWriter(anniversaryFilePath));
// for (String player : hasCelebrated) {
// writer.write(player);
// writer.newLine();
// }
// writer.close();
// }
// catch (Exception ex) {
// mcMMO.p.getLogger().severe(ex.toString());
// }
// }
//
// // This gets called from /mcmmo command
// public void anniversaryCheck(final CommandSender sender) {
// GregorianCalendar anniversaryStart = new GregorianCalendar(currentYear, Calendar.FEBRUARY, 3);
// GregorianCalendar anniversaryEnd = new GregorianCalendar(currentYear, Calendar.FEBRUARY, 6);
// GregorianCalendar day = new GregorianCalendar();
//
// if (hasCelebrated.contains(sender.getName())) {
// return;
// }
//
// if (!getDateRange(day.getTime(), anniversaryStart.getTime(), anniversaryEnd.getTime())) {
// return;
// }
//
// sender.sendMessage(LocaleLoader.getString("Holiday.Anniversary", (currentYear - START_YEAR)));
// /*if (sender instanceof 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() {
// spawnFireworks((Player) sender);
// }
// }, delay);
// }
// }*/
//// else {
// /*
// * Credit: http://www.geocities.com/spunk1111/
// * (good luck finding that in 3 years heh)
// * .''. . *''* :_\/_: .
// * :_\/_: _\(/_ .:.*_\/_* : /\ : .'.:.'.
// * .''.: /\ : /)\ ':'* /\ * : '..'. -=:o:=-
// * :_\/_:'.:::. ' *''* * '.\'/.'_\(/_ '.':'.'
// * : /\ : ::::: *_\/_* -= o =- /)\ '
// * '..' ':::' * /\ * .'/.\'. ' *
// * * *..* : *
// * * * *
// * * * *
// */
//
// /*
// * Color map
// * AAAA D GGGG JJJJJJ K
// * AAAAAA DDDDD EEEGGGGGG JJJJJJ KKKKKKK
// * BBBBAAAAAA DDD EEEGGGGGG I JJJJJ KKKKKKK
// * BBBBBBACCCCC D FFFF G IIIIIIIHHHHH KKKKKKK
// * BBBBBB CCCCC FFFFFF IIIIIII HHH K
// * BBBB CCCCC FFFFFF IIIIIII H k
// * b FFFF I k
// * b i k
// * b i k
// */
// Object[] colorParams = new Object[]{chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose(), chatColorChoose()};
// sender.sendMessage(String.format(" %1$s.''. %4$s. %7$s*''* %10$s:_\\/_: %11$s.", colorParams));
// sender.sendMessage(String.format(" %1$s:_\\/_: %4$s_\\(/_ %5$s.:.%7$s*_\\/_* %10$s: /\\ : %11$s.'.:.'.", colorParams));
// sender.sendMessage(String.format(" %2$s.''.%1$s: /\\ : %4$s/)\\ %5$s':'%7$s* /\\ * %9$s: %10$s'..'. %11$s-=:o:=-", colorParams));
// sender.sendMessage(String.format("%2$s:_\\/_:%1$s'%3$s.:::. %4$s' %6$s*''* %7$s* %9$s'.\\'/.'%8$s_\\(/_ %11$s'.':'.'", colorParams));
// sender.sendMessage(String.format("%2$s: /\\ : %3$s::::: %6$s*_\\/_* %9$s-= o =-%8$s /)\\ %11$s'", colorParams));
// sender.sendMessage(String.format(" %2$s'..' %3$s':::' %6$s* /\\ * %9$s.'/.\\'. %8$s' %11$s*", colorParams));
// sender.sendMessage(String.format(" %2$s* %6$s*..* %9$s: %11$s*", colorParams));
// sender.sendMessage(String.format(" %2$s* %9$s* %11$s*", colorParams));
// sender.sendMessage(String.format(" %2$s* %9$s* %11$s*", colorParams));
//// }
//
// hasCelebrated.add(sender.getName());
// }
//
// public boolean getDateRange(Date date, Date start, Date end) {
// return !(date.before(start) || date.after(end));
// }
//
//// public void spawnFireworks(Player player) {
//// int power = Misc.getRandom().nextInt(3) + 1;
//// Type fireworkType = Type.values()[Misc.getRandom().nextInt(Type.values().length)];
//// double varX = Misc.getRandom().nextGaussian() * 3;
//// double varZ = Misc.getRandom().nextGaussian() * 3;
////
//// Firework fireworks = (Firework) player.getWorld().spawnEntity(player.getLocation().add(varX, 0, varZ), EntityType.FIREWORK);
//// FireworkMeta fireworkmeta = fireworks.getFireworkMeta();
//// FireworkEffect effect = FireworkEffect.builder().flicker(Misc.getRandom().nextBoolean()).withColor(colorChoose()).withFade(colorChoose()).with(fireworkType).trail(Misc.getRandom().nextBoolean()).build();
//// fireworkmeta.addEffect(effect);
//// fireworkmeta.setPower(power);
//// fireworks.setFireworkMeta(fireworkmeta);
//// }
//
// private static List<Color> colorChoose() {
// return ALL_COLORS.subList(0, Math.max(Misc.getRandom().nextInt(ALL_COLORS.size() + 1), 1));
// }
//
// private static String chatColorChoose() {
// StringBuilder ret = new StringBuilder(ALL_CHAT_COLORS.get(Misc.getRandom().nextInt(ALL_CHAT_COLORS.size())).toString());
//
// for (ChatColor chatFormat : CHAT_FORMATS) {
// if (Misc.getRandom().nextInt(CHAT_FORMATS.size()) == 0) {
// ret.append(chatFormat);
// }
// }
//
// return ret.toString();
// }
//
// public boolean isAprilFirst() {
// if(!Config.getInstance().isAprilFoolsAllowed())
// return false;
//
// 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() {
// if(!Config.getInstance().isAprilFoolsAllowed())
// return false;
//
// 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.getHolidayManager().levelUpApril(player, FakeSkillType.getByStatistic(statistic));
// }
// }
//
// public void levelUpApril(Player player, FakeSkillType fakeSkillType) {
// if(!Config.getInstance().isAprilFoolsAllowed())
// return;
//
// final McMMOPlayer mmoPlayer = UserManager.getPlayer(player);
// if (mmoPlayer == null) return;
//
// int levelTotal = Misc.getRandom().nextInt(1 + mmoPlayer.getSkillLevel(PrimarySkillType.MINING)) + 1;
// SoundManager.sendSound(player, player.getLocation(), SoundType.LEVEL_UP);
// NotificationManager.sendPlayerInformation(player, NotificationType.HOLIDAY, "Holiday.AprilFools.Levelup", StringUtils.getCapitalized(fakeSkillType.toString()), String.valueOf(levelTotal));
//// ParticleEffectUtils.fireworkParticleShower(player, ALL_COLORS.get(Misc.getRandom().nextInt(ALL_COLORS.size())));
// }
//
// public void registerAprilCommand() {
// if(!Config.getInstance().isAprilFoolsAllowed())
// return;
//
// PluginCommand command = mcMMO.p.getCommand("crafting");
// command.setExecutor(new AprilCommand());
// }
//}

View File

@ -131,7 +131,7 @@ public final class MobHealthbarUtils {
return null; return null;
} }
int coloredDisplay = (int) Math.ceil(fullDisplay * (healthPercentage / 100.0D)); int coloredDisplay = (int) Math.max(Math.ceil(fullDisplay * (healthPercentage / 100.0D)), 0.5);
int grayDisplay = fullDisplay - coloredDisplay; int grayDisplay = fullDisplay - coloredDisplay;
StringBuilder healthbar = new StringBuilder(color + ""); StringBuilder healthbar = new StringBuilder(color + "");

View File

@ -2,16 +2,17 @@ package com.gmail.nossr50.util;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.jetbrains.annotations.NotNull;
public class TransientMetadataTools { public class TransientMetadataTools {
public static final String OLD_NAME_METAKEY = TransientMetadataTools.OLD_NAME_METAKEY; public static final String OLD_NAME_METAKEY = TransientMetadataTools.OLD_NAME_METAKEY;
private final mcMMO pluginRef; private final mcMMO pluginRef;
public TransientMetadataTools(mcMMO pluginRef) { public TransientMetadataTools(@NotNull mcMMO pluginRef) {
this.pluginRef = pluginRef; this.pluginRef = pluginRef;
} }
public void cleanAllMobMetadata(LivingEntity livingEntity) { public void cleanAllLivingEntityMetadata(@NotNull LivingEntity livingEntity) {
//Since its not written anywhere, apparently the GC won't touch objects with metadata still present on them //Since its not written anywhere, apparently the GC won't touch objects with metadata still present on them
if (livingEntity.hasMetadata(mcMMO.customNameKey)) { if (livingEntity.hasMetadata(mcMMO.customNameKey)) {
livingEntity.setCustomName(livingEntity.getMetadata(mcMMO.customNameKey).get(0).asString()); livingEntity.setCustomName(livingEntity.getMetadata(mcMMO.customNameKey).get(0).asString());
@ -33,6 +34,14 @@ public class TransientMetadataTools {
livingEntity.removeMetadata(mcMMO.travelingBlock, pluginRef); livingEntity.removeMetadata(mcMMO.travelingBlock, pluginRef);
} }
if(livingEntity.hasMetadata(mcMMO.RUPTURE_META_KEY)) {
livingEntity.removeMetadata(mcMMO.RUPTURE_META_KEY, pluginRef);
}
if(livingEntity.hasMetadata(mcMMO.EXPLOSION_FROM_RUPTURE)) {
livingEntity.removeMetadata(mcMMO.EXPLOSION_FROM_RUPTURE, pluginRef);
}
//Cleanup mob metadata //Cleanup mob metadata
mcMMO.getCompatibilityManager().getPersistentDataLayer().removeMobFlags(livingEntity); mcMMO.getCompatibilityManager().getPersistentDataLayer().removeMobFlags(livingEntity);
} }

View File

@ -92,10 +92,9 @@ public final class CombatUtils {
mmoPlayer.getSuperAbilityManager().checkAbilityActivation(PrimarySkillType.SWORDS); mmoPlayer.getSuperAbilityManager().checkAbilityActivation(PrimarySkillType.SWORDS);
} }
if(target.getHealth() - event.getFinalDamage() >= 1) if(target.getHealth() - event.getFinalDamage() > 0) {
{
if (swordsManager.canUseRupture()) { if (swordsManager.canUseRupture()) {
swordsManager.ruptureCheck(target); swordsManager.processRupture(target);
} }
} }
@ -777,7 +776,7 @@ public final class CombatUtils {
NotificationManager.sendPlayerInformation((Player)entity, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.SS.Struck"); NotificationManager.sendPlayerInformation((Player)entity, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.SS.Struck");
} }
UserManager.queryPlayer(attacker).getSwordsManager().ruptureCheck(target); UserManager.queryPlayer(attacker).getSwordsManager().processRupture(target);
break; break;
case AXES: case AXES:

View File

@ -3,6 +3,7 @@ package com.gmail.nossr50.util.skills;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundManager;
import com.gmail.nossr50.util.sounds.SoundType; import com.gmail.nossr50.util.sounds.SoundType;
import org.apache.commons.lang.math.RandomUtils;
import org.bukkit.Effect; import org.bukkit.Effect;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
@ -27,9 +28,40 @@ public final class ParticleEffectUtils {
return; return;
} }
livingEntity.getWorld().playEffect(livingEntity.getEyeLocation(), Effect.STEP_SOUND, Material.REDSTONE_WIRE); Location origin = livingEntity.getEyeLocation().clone();
World world = origin.getWorld();
double x = origin.getX();
double y = origin.getY();
double z = origin.getZ();
double offSetVal = 0.3D;
Location locA = new Location(world, x - offSetVal, y, z);
Location locB = new Location(world, x + offSetVal, y, z);
Location locC = new Location(world, x, y + offSetVal, z);
Location locD = new Location(world, x, y - offSetVal, z);
Location locE = new Location(world, x, y, z + offSetVal);
Location locF = new Location(world, x, y, z - offSetVal);
Location locG = new Location(world, x + offSetVal, y, z + offSetVal);
Location locH = new Location(world, x - offSetVal, y, z - offSetVal);
Location locI = new Location(world, x - offSetVal, y - offSetVal, z - offSetVal);
Location locJ = new Location(world, x + offSetVal, y - offSetVal, z + offSetVal);
Location locK = new Location(world, x - offSetVal, y + offSetVal, z - offSetVal);
Location locL = new Location(world, x - offSetVal, y + offSetVal, z - offSetVal);
Location[] particleLocations = new Location[]{ locA, locB, locC, locD, locE, locF, locG, locH, locI, locJ, locK, locL};
for(Location location : particleLocations) {
if(RandomUtils.nextInt(100) > 30) {
//TODO: Change
livingEntity.getWorld().playEffect(location, Effect.STEP_SOUND, Material.REDSTONE_WIRE);
}
}
} }
public static void playDodgeEffect(Player player) { public static void playDodgeEffect(Player player) {
if (!Config.getInstance().getDodgeEffectEnabled()) { if (!Config.getInstance().getDodgeEffectEnabled()) {
return; return;

View File

@ -206,14 +206,7 @@ Skills:
Fishing: Fishing:
ShakeChance: ShakeChance:
Rank_1: 15.0 Rank_1: 30
Rank_2: 15.0
Rank_3: 25.0
Rank_4: 35.0
Rank_5: 45.0
Rank_6: 55.0
Rank_7: 65.0
Rank_8: 75.0
# VanillaXPMultiplier: Vanilla XP gained from fishing is multiplied by these values. # VanillaXPMultiplier: Vanilla XP gained from fishing is multiplied by these values.
VanillaXPMultiplier: VanillaXPMultiplier:
@ -454,24 +447,42 @@ Skills:
### ###
Swords: Swords:
Rupture: Rupture:
# ChanceMax: Maximum chance of triggering bleeding Rupture_Mechanics:
# MaxBonusLevel: On this level, the chance to cause Bleeding will be <ChanceMax> # This is % chance, 15 would mean 15% percent of the time
ChanceMax: 33.0 Chance_To_Apply_On_Hit:
MaxBonusLevel: Rank_1: 15
Standard: 100 Rank_2: 33
RetroMode: 1000 Rank_3: 40
Rank_4: 66
# DamagePlayer: Bleeding damage dealt to players Duration_In_Seconds:
# DamageMobs: Bleeding damage dealt to mobs Against_Players: 5
DamagePlayer: 2.0 Against_Mobs: 5
DamageMobs: 3.0 # Tick interval damage is applied twice a second during rupture, it is "pure" and does not get lowered from armor or absorption etc
Tick_Interval_Damage:
# These settings determine how long the Bleeding effect lasts Against_Players:
MaxTicks: 8 Rank_1: 0.1
BaseTicks: 2 Rank_2: 0.15
Rank_3: 0.2
Rank_4: 0.3
Against_Mobs:
Rank_1: 0.5
Rank_2: 0.75
Rank_3: 0.9
Rank_4: 1
# If Rupture runs for 5 seconds without being reapplied, it explodes
# this damage is **NOT** pure and is reduced dramatically vs armor/absorption/etc
Explosion_Damage:
Against_Players:
Rank_1: 10
Rank_2: 20
Rank_3: 30
Rank_4: 40
Against_Mobs:
Rank_1: 10
Rank_2: 20
Rank_3: 30
Rank_4: 40
CounterAttack: CounterAttack:
# ChanceMax: Maximum chance of triggering a counter attack # ChanceMax: Maximum chance of triggering a counter attack
# MaxBonusLevel: On this level, the chance to Counter will be <ChanceMax> # MaxBonusLevel: On this level, the chance to Counter will be <ChanceMax>
ChanceMax: 30.0 ChanceMax: 30.0

View File

@ -49,7 +49,6 @@ General:
RetroMode: RetroMode:
Enabled: true Enabled: true
Locale: en_US Locale: en_US
AprilFoolsEvent: true
MOTD_Enabled: true MOTD_Enabled: true
EventBroadcasts: true EventBroadcasts: true
EventInfoOnPlayerJoin: true EventInfoOnPlayerJoin: true

View File

@ -412,7 +412,7 @@ Anvil.Unbreakable=This item is unbreakable!
#SWORDS #SWORDS
Swords.Ability.Lower=&7You lower your sword. Swords.Ability.Lower=&7You lower your sword.
Swords.Ability.Ready=&3You &6ready&3 your Sword. Swords.Ability.Ready=&3You &6ready&3 your Sword.
Swords.Combat.Rupture.Note=&7NOTE: &e1 Tick happens every 0.5 seconds! Swords.Combat.Rupture.Note=&7(Rupture Note): Periodic damage is non-lethal occuring twice a second and bypasses armor, explosion damage is lethal and does not bypass armor/resistances
Swords.Combat.Bleeding.Started=&4 You're bleeding! Swords.Combat.Bleeding.Started=&4 You're bleeding!
Swords.Combat.Bleeding.Stopped=&7The bleeding has &astopped&7! Swords.Combat.Bleeding.Stopped=&7The bleeding has &astopped&7!
Swords.Combat.Bleeding=&a**ENEMY BLEEDING** Swords.Combat.Bleeding=&a**ENEMY BLEEDING**
@ -426,7 +426,7 @@ Swords.SubSkill.SerratedStrikes.Name=Serrated Strikes
Swords.SubSkill.SerratedStrikes.Description=Deal partial damage in an AOE with a chance to apply Rupture! Swords.SubSkill.SerratedStrikes.Description=Deal partial damage in an AOE with a chance to apply Rupture!
Swords.SubSkill.SerratedStrikes.Stat=Serrated Strikes Length Swords.SubSkill.SerratedStrikes.Stat=Serrated Strikes Length
Swords.SubSkill.Rupture.Name=Rupture Swords.SubSkill.Rupture.Name=Rupture
Swords.SubSkill.Rupture.Description=Apply a powerful bleed DoT Swords.SubSkill.Rupture.Description=A damage over time effect that ends explosively
Swords.SubSkill.Stab.Name=Stab Swords.SubSkill.Stab.Name=Stab
Swords.SubSkill.Stab.Description=Adds bonus damage to your attacks. Swords.SubSkill.Stab.Description=Adds bonus damage to your attacks.
Swords.SubSkill.Stab.Stat=Stab Damage Swords.SubSkill.Stab.Stat=Stab Damage
@ -434,7 +434,9 @@ Swords.SubSkill.SwordsLimitBreak.Name=Swords Limit Break
Swords.SubSkill.SwordsLimitBreak.Description=Breaking your limits. Increased damage against tough opponents. Intended for PVP, up to server settings for whether or not it will boost damage in PVE. Swords.SubSkill.SwordsLimitBreak.Description=Breaking your limits. Increased damage against tough opponents. Intended for PVP, up to server settings for whether or not it will boost damage in PVE.
Swords.SubSkill.SwordsLimitBreak.Stat=Limit Break Max DMG Swords.SubSkill.SwordsLimitBreak.Stat=Limit Break Max DMG
Swords.SubSkill.Rupture.Stat=Rupture Chance Swords.SubSkill.Rupture.Stat=Rupture Chance
Swords.SubSkill.Rupture.Stat.Extra=Rupture: &a{0} ticks [{1} DMG vs Player] [{2} DMG vs Mobs] Swords.SubSkill.Rupture.Stat.Extra=[[DARK_AQUA]]Rupture Duration: &e{0}s&a vs Players, &e{1}s&a vs Mobs.
Swords.SubSkill.Rupture.Stat.TickDamage=[[DARK_AQUA]]Rupture Pure Tick Damage: &e{0}&a vs Players, &e{1}&a vs Mobs.
Swords.SubSkill.Rupture.Stat.ExplosionDamage=[[DARK_AQUA]]Rupture Explosion Damage: &e{0}&a vs Players, &e{1}&a vs Mobs
Swords.Effect.4=Serrated Strikes Rupture+ Swords.Effect.4=Serrated Strikes Rupture+
Swords.Effect.5={0} Tick Rupture Swords.Effect.5={0} Tick Rupture
Swords.Listener=Swords: Swords.Listener=Swords:

View File

@ -1,8 +1,8 @@
Acrobatics.Ability.Proc=&a**VeiligeLanding** Acrobatics.Ability.Proc=&a**Veilige Landing**
Acrobatics.Combat.Proc=&a**Ontweken** Acrobatics.Combat.Proc=&a**Ontweken**
Acrobatics.DodgeChance=Ontwijk Kans: &e{0} Acrobatics.DodgeChance=Ontwijk Kans: &e{0}
Acrobatics.SubSkill.Roll.Name=Rollen Acrobatics.SubSkill.Roll.Name=Rollen
Acrobatics.SubSkill.GracefulRoll.Name=Veilige Roll Acrobatics.SubSkill.GracefulRoll.Name=Veilige Rol
Acrobatics.SubSkill.Dodge.Name=Ontwijken Acrobatics.SubSkill.Dodge.Name=Ontwijken
Acrobatics.Listener=Acrobatiek Acrobatics.Listener=Acrobatiek
Acrobatics.SubSkill.Roll.Chance=Rol Kans: &e{0} Acrobatics.SubSkill.Roll.Chance=Rol Kans: &e{0}
@ -18,19 +18,19 @@ Archery.SubSkill.ArrowRetrieval.Description=Kans om pijlen te krijgen van lijken
Archery.Listener=Boogschieten: Archery.Listener=Boogschieten:
Archery.SkillName=BOOGSCHIETEN Archery.SkillName=BOOGSCHIETEN
Archery.Skillup= Boogschieten ervaring toegenomen met {0}. Totaal ({1}) Archery.Skillup= Boogschieten ervaring toegenomen met {0}. Totaal ({1})
Axes.Ability.Bonus.0=Bijl Meesterschap Axes.Ability.Bonus.0=Bijl Vaardigheid
Axes.Ability.Bonus.1=Bonus {0} schade Axes.Ability.Bonus.1=Bonus {0} schade
Axes.Ability.Bonus.4=Grotere impact Axes.Ability.Bonus.4=Grotere impact
Axes.Ability.Lower=&a**JE STOP JE BIJL WEER WEG** Axes.Ability.Lower=&a**JE STOP JE BIJL WEER WEG**
Axes.Ability.Ready=&a**JE HOUDT JE BIJL GEREED** Axes.Ability.Ready=&a**JE HOUDT JE BIJL GEREED**
Axes.Combat.CritStruck=&4Je bent KRITISCH geraakt Axes.Combat.CritStruck=&4Je bent KRITISCH geraakt
Axes.Combat.CriticalHit=Kritische Klap Axes.Combat.CriticalHit=Ernstige Klap
Axes.Combat.GI.Proc=&a ** GESLAGEN MET GROTE KRACHT ** Axes.Combat.GI.Proc=&a ** GESLAGEN MET GROTE KRACHT **
Axes.Combat.GI.Struck=**GETROFFEN MET MEER SCHADE** Axes.Combat.GI.Struck=**GETROFFEN MET MEER SCHADE**
Axes.Combat.SS.Length=Schedel Splijter Lengte: &e{0}s Axes.Combat.SS.Length=Schedel Splijter Lengte: &e{0}s
Axes.SubSkill.SkullSplitter.Name=Schedel Splijter Axes.SubSkill.SkullSplitter.Name=Schedel Splijter
Axes.SubSkill.SkullSplitter.Description=Veroorzaak AoE Schade Axes.SubSkill.SkullSplitter.Description=Veroorzaak AoE Schade
Axes.SubSkill.CriticalStrikes.Name=Kritieke Slag Axes.SubSkill.CriticalStrikes.Name=Ernstige Slag
Axes.SubSkill.CriticalStrikes.Description=Verdubbelde Schade Axes.SubSkill.CriticalStrikes.Description=Verdubbelde Schade
Axes.SubSkill.AxeMastery.Name=Bijl Meesterschap Axes.SubSkill.AxeMastery.Name=Bijl Meesterschap
Axes.SubSkill.AxeMastery.Description=Voegt DMG bonus toe Axes.SubSkill.AxeMastery.Description=Voegt DMG bonus toe
@ -69,7 +69,7 @@ Fishing.SubSkill.MagicHunter.Description=Vind Enchanted Spullen
Fishing.SubSkill.Shake.Name=Schudden (vs. Wezens) Fishing.SubSkill.Shake.Name=Schudden (vs. Wezens)
Fishing.SubSkill.Shake.Description=Schud items af van mobs w/ hengel Fishing.SubSkill.Shake.Description=Schud items af van mobs w/ hengel
Fishing.SubSkill.FishermansDiet.Name=Visserman\'s dieet Fishing.SubSkill.FishermansDiet.Name=Visserman\'s dieet
Fishing.SubSkill.FishermansDiet.Description=Verbetert de honger hersteld vanaf geviste voedingsmiddelen Fishing.SubSkill.FishermansDiet.Description=Verbetert de honger hersteld door geviste voedingsmiddelen
Fishing.SubSkill.MasterAngler.Name=Meester Hengelaar Fishing.SubSkill.MasterAngler.Name=Meester Hengelaar
Fishing.SubSkill.IceFishing.Name=Ijs Vissen Fishing.SubSkill.IceFishing.Name=Ijs Vissen
Fishing.SubSkill.IceFishing.Description=Stelt je in staat om te vissen in de ijzige biomen Fishing.SubSkill.IceFishing.Description=Stelt je in staat om te vissen in de ijzige biomen
@ -84,7 +84,7 @@ Herbalism.Ability.Ready=&a**JE HOUDT JE ZEIS GEREED**
Herbalism.SubSkill.GreenThumb.Name=Groene Duim (Graan) Herbalism.SubSkill.GreenThumb.Name=Groene Duim (Graan)
Herbalism.SubSkill.GreenThumb.Description.2=Maak stenen bemost, of laat gras groeien Herbalism.SubSkill.GreenThumb.Description.2=Maak stenen bemost, of laat gras groeien
Herbalism.SubSkill.FarmersDiet.Name=Boeren dieet Herbalism.SubSkill.FarmersDiet.Name=Boeren dieet
Herbalism.SubSkill.FarmersDiet.Description=Verbetert de honger herstel van gekweekte voedingsmiddelen Herbalism.SubSkill.FarmersDiet.Description=Verbetert de honger hersteld door gekweekte voedingsmiddelen
Herbalism.SubSkill.DoubleDrops.Name=Dubbele drops (Alle Kruiden) Herbalism.SubSkill.DoubleDrops.Name=Dubbele drops (Alle Kruiden)
Herbalism.SubSkill.DoubleDrops.Description=Het dubbele van de normale buit Herbalism.SubSkill.DoubleDrops.Description=Het dubbele van de normale buit
Herbalism.SubSkill.HylianLuck.Name=Hylian Geluk Herbalism.SubSkill.HylianLuck.Name=Hylian Geluk
@ -110,7 +110,7 @@ Mining.SkillName=MIJNBOUW
Mining.Skills.SuperBreaker.Off= ** Super Breaker is uitgewerkt ** Mining.Skills.SuperBreaker.Off= ** Super Breaker is uitgewerkt **
Mining.Skills.SuperBreaker.Other.Off=Super Breker &ais uitgewerkt voor &e{0} Mining.Skills.SuperBreaker.Other.Off=Super Breker &ais uitgewerkt voor &e{0}
Mining.Skills.SuperBreaker.Refresh=&aJe&eSuper Breeker &akracht is hersteld! Mining.Skills.SuperBreaker.Refresh=&aJe&eSuper Breeker &akracht is hersteld!
Mining.Skillup=Mijn ervaring toegenomen met {0}. Totaal: ({1}) Mining.Skillup=Mijn ervaring is toegenomen met {0}. Totaal: ({1})
Mining.Blast.Boom=&7**BOEM** Mining.Blast.Boom=&7**BOEM**
Mining.Blast.Radius.Increase= Ontploffings Radius Verhoging: &e {0} Mining.Blast.Radius.Increase= Ontploffings Radius Verhoging: &e {0}
Mining.Blast.Rank=Explosie Mining: &e Rang {0}/8 &7({1}) Mining.Blast.Rank=Explosie Mining: &e Rang {0}/8 &7({1})
@ -127,18 +127,18 @@ Repair.SubSkill.StoneRepair.Description=Repareer Stenen Gereedschap & Wapenuitru
Repair.SubSkill.RepairMastery.Name=Reparatie Meesterschap Repair.SubSkill.RepairMastery.Name=Reparatie Meesterschap
Repair.SubSkill.RepairMastery.Description=Toegenomen reparatie aantal Repair.SubSkill.RepairMastery.Description=Toegenomen reparatie aantal
Repair.SubSkill.SuperRepair.Name=Super Reparatie Repair.SubSkill.SuperRepair.Name=Super Reparatie
Repair.SubSkill.SuperRepair.Description=Verdubbelde effectiefheid Repair.SubSkill.SuperRepair.Description=Verdubbelde effectiviteit
Repair.SubSkill.DiamondRepair.Name=Diamanten Reparatie ({0}+ SKILL) Repair.SubSkill.DiamondRepair.Name=Diamanten Reparatie ({0}+ SKILL)
Repair.SubSkill.DiamondRepair.Description=Repareer Diamanten Gereedschap & Wapenuitrusting Repair.SubSkill.DiamondRepair.Description=Repareer Diamanten Gereedschap & Wapenuitrusting
Repair.SubSkill.ArcaneForging.Name=Arcane Smeden Repair.SubSkill.ArcaneForging.Name=Arcane Smeden
Repair.SubSkill.ArcaneForging.Description=Magische voorwerpen repareren Repair.SubSkill.ArcaneForging.Description=Magische voorwerpen repareren
Repair.Listener.Anvil=&4Je hebt een aambeeld geplaatst, met een aambeeld kun je je gereedschappen en pantser mee repareren Repair.Listener.Anvil=&4Je hebt een aambeeld geplaatst. Met een aambeeld kun je je gereedschappen en pantser repareren
Repair.Listener=Repareer: Repair.Listener=Repareer:
Repair.SkillName=REPAREER Repair.SkillName=REPAREER
Repair.Skills.AdeptDiamond=&4Je bent nog niet sterk genoeg om diamant te repareren. Repair.Skills.AdeptDiamond=&4Je bent nog niet sterk genoeg om diamant te repareren.
Repair.Skills.AdeptGold=&4Je bent niet goed genoeg om goud te repareren. Repair.Skills.AdeptGold=&4Je bent niet vaardig genoeg om goud te repareren.
Repair.Skills.AdeptIron=&4Je bent niet vaardig genoeg om Ijzer te repareren. Repair.Skills.AdeptIron=&4Je bent niet vaardig genoeg om Ijzer te repareren.
Repair.Skills.AdeptStone=&4Je bent nog niet sterk genoeg om steen te repareren. Repair.Skills.AdeptStone=&4Je bent nog niet vaardig genoeg om steen te repareren.
Repair.Skills.FeltEasy=&7Dat voelde makkelijk. Repair.Skills.FeltEasy=&7Dat voelde makkelijk.
Repair.Skills.FullDurability=[[GRIJS]] Dat is bij volledige duurzaamheid. Repair.Skills.FullDurability=[[GRIJS]] Dat is bij volledige duurzaamheid.
Repair.Skillup=Repareer ervaring toegenomen met {0}. Totaal: ({1}) Repair.Skillup=Repareer ervaring toegenomen met {0}. Totaal: ({1})
@ -164,9 +164,9 @@ Swords.Effect.5={0} Tick Bloeden
Swords.SubSkill.Bleed.Name=Bloeden Swords.SubSkill.Bleed.Name=Bloeden
Swords.Listener=Zwaarden: Swords.Listener=Zwaarden:
Swords.SkillName=ZWAARDEN Swords.SkillName=ZWAARDEN
Swords.Skills.SS.Off=**Serrated Strikes is uitgewerkt** Swords.Skills.SS.Off=**Gekartelde Slag is uitgewerkt**
Swords.Skills.SS.On=&a**GEKARTELDE SLAG GEACTIVEERD** Swords.Skills.SS.On=&a**GEKARTELDE SLAG GEACTIVEERD**
Swords.Skills.SS.Refresh=&aJe &eGekarteld Slag &a kracht is hersteld! Swords.Skills.SS.Refresh=&aJe &eGekartelde Slag &a kracht is hersteld!
Swords.Skills.SS.Other.Off=Gekartelde Slag&a is uitgewerkt voor &e{0} Swords.Skills.SS.Other.Off=Gekartelde Slag&a is uitgewerkt voor &e{0}
Swords.Skills.SS.Other.On=&a{0}&2 heeft &cGekartelde Slag&2gebruikt! Swords.Skills.SS.Other.On=&a{0}&2 heeft &cGekartelde Slag&2gebruikt!
Swords.Skillup=Zwaarden ervaring toegenomen met {0}. Totaal: ({1}) Swords.Skillup=Zwaarden ervaring toegenomen met {0}. Totaal: ({1})
@ -180,13 +180,13 @@ Taming.Ability.Bonus.7=+{0} Schade
Taming.Ability.Bonus.8=Snel Eten Service Taming.Ability.Bonus.8=Snel Eten Service
Taming.SubSkill.ShockProof.Name=Schokbestendig Taming.SubSkill.ShockProof.Name=Schokbestendig
Taming.SubSkill.ShockProof.Description=Explosieve Schade Verkleining Taming.SubSkill.ShockProof.Description=Explosieve Schade Verkleining
Taming.SubSkill.CallOfTheWild.Name=Roep van het WIld Taming.SubSkill.CallOfTheWild.Name=Roep van het Wild
Taming.SubSkill.CallOfTheWild.Description=Roep een dier aan je zijde op Taming.SubSkill.CallOfTheWild.Description=Roep een dier aan je zijde op
Taming.SubSkill.CallOfTheWild.Description.2=&7COTW (Ocelot): Buk en linkermuisknop met {0} Vis in je hand Taming.SubSkill.CallOfTheWild.Description.2=&7COTW (Ocelot): Buk en linkermuisknop met {0} Vis in je hand
Taming.Effect.15=&7COTW (Wolf): Buk en linkermuisknop met {0} Botten in je hand Taming.Effect.15=&7COTW (Wolf): Buk en linkermuisknop met {0} Botten in je hand
Taming.SubSkill.FastFoodService.Name=Fast Food Service Taming.SubSkill.FastFoodService.Name=Fast Food Service
Taming.SubSkill.FastFoodService.Description=Kans voor wolven na een aanval te regeneren Taming.SubSkill.FastFoodService.Description=Kans voor wolven na een aanval te regeneren
Taming.SubSkill.Gore.Description=Kritische Slag dat Blood toepast Taming.SubSkill.Gore.Description=Ernstige Slag dat Blood toepast
Taming.SubSkill.SharpenedClaws.Name=Geslepen Klauwen Taming.SubSkill.SharpenedClaws.Name=Geslepen Klauwen
Taming.SubSkill.SharpenedClaws.Description=Schade Bonus Taming.SubSkill.SharpenedClaws.Description=Schade Bonus
Taming.SubSkill.EnvironmentallyAware.Name=Omgevings bewust Taming.SubSkill.EnvironmentallyAware.Name=Omgevings bewust
@ -266,17 +266,17 @@ Commands.mmoedit.Modified.2={0} is aangepast voor {1}.
Commands.mcconvert.Database.Same= Je maakt al gebruik van de {0} database! Commands.mcconvert.Database.Same= Je maakt al gebruik van de {0} database!
Commands.mcconvert.Database.InvalidType= {0} is geen geldig soort database. Commands.mcconvert.Database.InvalidType= {0} is geen geldig soort database.
Commands.ModDescription=- Lees instructie mod beschrijving Commands.ModDescription=- Lees instructie mod beschrijving
Commands.NoConsole=Deze commando wordt niet ondersteund vanuit de console. Commands.NoConsole=Dit commando wordt niet ondersteund vanuit de console.
Commands.Other=&a--OVERIGE COMMANDS-- Commands.Other=&a--OVERIGE COMMANDS--
Commands.Party.Header=-----[]&aGROEP&c[]----- Commands.Party.Header=-----[]&aGROEP&c[]-----
Commands.Party.Status=&8NAAM: &f{0} {1} Commands.Party.Status=&8NAAM: &f{0} {1}
Commands.Party.ShareMode=&8DEEL MODUS: Commands.Party.ShareMode=&8DEEL MODUS:
Commands.Party.ExpShare=&7EXP &3({0}) Commands.Party.ExpShare=&7EXP &3({0})
Commands.Party.Accept=- Accepteer groep uitnodiging Commands.Party.Accept=- Accepteer groepsuitnodiging
Commands.Party.Chat.Off=Groep\'s Chat &cUit Commands.Party.Chat.Off=Groep\'s Chat &cUit
Commands.Party.Chat.On=Groep\'s Chat &aAan Commands.Party.Chat.On=Groep\'s Chat &aAan
Commands.Party.Commands=&a--GROEP COMMANDOS-- Commands.Party.Commands=&a--GROEP COMMANDOS--
Commands.Party.Invite.0=ALERT: &aJij hebt een groep uitnodiging ontvangen voor {0} van {1} Commands.Party.Invite.0=ALERT: &aJij hebt een groepsuitnodiging ontvangen voor {0} van {1}
Commands.Party.Invite=- Verstuur groepsuitnodiging Commands.Party.Invite=- Verstuur groepsuitnodiging
Commands.Party.Join=&7heeft zich aangesloten bij de groep: {0} Commands.Party.Join=&7heeft zich aangesloten bij de groep: {0}
Commands.Party.Create=&7Groep aangemaakt: {0} Commands.Party.Create=&7Groep aangemaakt: {0}
@ -286,21 +286,21 @@ Commands.Party.AlreadyExists=&4Groep {0} bestaat al!
Commands.Party.Kick=Je bent verwijderd uit de groep {0}! Commands.Party.Kick=Je bent verwijderd uit de groep {0}!
Commands.Party.Leave=Je hebt de groep verlaten Commands.Party.Leave=Je hebt de groep verlaten
Commands.Party.Members.Header=-----[]&aLEDEN&c[]----- Commands.Party.Members.Header=-----[]&aLEDEN&c[]-----
Commands.Party.None=Je bent niet in een groep. Commands.Party.None=Je zit niet in een groep.
Commands.Party.Quit=- Verlaat je huidige groep Commands.Party.Quit=- Verlaat je huidige groep
Commands.Party.Teleport=<player> &c- Teleport naar een groepslid Commands.Party.Teleport=<player> &c- Teleporteer naar een groepslid
Commands.Party.Toggle=- Zet Party Chat aan/uit Commands.Party.Toggle=- Zet Party Chat aan/uit
Commands.Party.1=- Maak een nieuwe groep Commands.Party.1=- Maak een nieuwe groep
Commands.Party.2=- Ga bij een spelers groep Commands.Party.2=- Ga bij een spelers groep
Commands.ptp.NoRequests= Je hebt geen teleporteren aanvragen op dit moment Commands.ptp.NoRequests= Je hebt geen teleportatie aanvragen op dit moment
Commands.ptp.RequestExpired=Groep\'s teleport verzoek is verlopen! Commands.ptp.RequestExpired=Groep\'s teleportatie verzoek is verlopen!
Commands.PowerLevel.Leaderboard=--mcMMO&9 Kracht Level &eLeiderbord-- Commands.PowerLevel.Leaderboard=--mcMMO&9 Kracht Level &eLeiderbord--
Commands.PowerLevel=&4KRACHT LEVEL: &a{0} Commands.PowerLevel=&4KRACHT LEVEL: &a{0}
Commands.Reset=Reset een niveau level naar 0 Commands.Reset=Reset een niveau level naar 0
Commands.Skill.Invalid= Dat is geen geldig skillname! Commands.Skill.Invalid= Dat is geen geldig skillname!
Commands.Skill.Leaderboard=--mcMMO &9{0}&e Ranglijst -- Commands.Skill.Leaderboard=--mcMMO &9{0}&e Ranglijst --
Commands.Stats.Self=Je status Commands.Stats.Self=Jouw status
Commands.Stats=- Laat je mcMMO statussen zien Commands.Stats=- Laat jouw mcMMO statussen zien
Commands.ToggleAbility= - Toggle Kracht activering met rechts klikken Commands.ToggleAbility= - Toggle Kracht activering met rechts klikken
Commands.Usage.Level=niveau Commands.Usage.Level=niveau
Commands.Usage.Message=bericht Commands.Usage.Message=bericht
@ -309,8 +309,8 @@ Commands.Usage.Password=wachtwoord
Commands.Usage.Player=speler Commands.Usage.Player=speler
Commands.Usage.Skill=Niveau Commands.Usage.Skill=Niveau
Commands.Usage.XP=xp Commands.Usage.XP=xp
mcMMO.NoPermission=&4Te wijning permissions. mcMMO.NoPermission=&4Te weining machtigingen.
mcMMO.NoSkillNote=&8als je geen toegang hebt tot een vermogen, wordt die hier niet getoont mcMMO.NoSkillNote=&8als je geen toegang hebt tot een vermogen, wordt die hier niet getoond
Party.Forbidden=[mcMMO] Groepen zijn niet toegestaan in deze wereld (zie Machtigingen) Party.Forbidden=[mcMMO] Groepen zijn niet toegestaan in deze wereld (zie Machtigingen)
Party.Help.1=Maak een groep aan met &3{0} <name> [password]. Party.Help.1=Maak een groep aan met &3{0} <name> [password].
Party.Help.10=Gebruik &3{0} &com XP delen met groepsleden te activeren Party.Help.10=Gebruik &3{0} &com XP delen met groepsleden te activeren
@ -321,9 +321,9 @@ Party.Invite.Self=Je kan jezelf niet uitnodigen!
Party.IsLocked=Deze groep is al gesloten! Party.IsLocked=Deze groep is al gesloten!
Party.IsntLocked=Deze groep is niet gesloten! Party.IsntLocked=Deze groep is niet gesloten!
Party.Locked=De groep is gesloten, alleen de groepsleider kan spelers uitnodigen. Party.Locked=De groep is gesloten, alleen de groepsleider kan spelers uitnodigen.
Party.NotInYourParty=&4{0} zit niet in jou groep Party.NotInYourParty=&4{0} zit niet in jouw groep
Party.NotOwner=&4Jij bent niet de groepsleider. Party.NotOwner=&4Jij bent niet de groepsleider.
Party.Owner.New=&a{0} is de nieuwe groep leider. Party.Owner.New=&a{0} is de nieuwe groepsleider.
Party.Owner.NotLeader=&4Jij bent niet meer de groepsleider. Party.Owner.NotLeader=&4Jij bent niet meer de groepsleider.
Party.Owner.Player=&aJij bent nu de groep eigenaar. Party.Owner.Player=&aJij bent nu de groep eigenaar.
Party.Password.None=Deze groep is vergrendeld met een wachtwoord. Voer het wachtwoord in om in deze groep te komen. Party.Password.None=Deze groep is vergrendeld met een wachtwoord. Voer het wachtwoord in om in deze groep te komen.
@ -337,8 +337,8 @@ Party.PlayerNotInParty=&4{0} zit niet in een groep
Party.Specify=Je moet een groep invullen. Party.Specify=Je moet een groep invullen.
Party.Teleport.Dead=[RED]Je kan niet naar een dode speler teleporteren. Party.Teleport.Dead=[RED]Je kan niet naar een dode speler teleporteren.
Party.Teleport.Hurt=Je hebt schade opgelopen in de afgelopen {0} seconden en je kan niet teleporten. Party.Teleport.Hurt=Je hebt schade opgelopen in de afgelopen {0} seconden en je kan niet teleporten.
Party.Teleport.Player=&a Je hebt geteleporteerd naar {0}. Party.Teleport.Player=&a Je bent geteleporteerd naar {0}.
Party.Teleport.Target=&a{0} is naar jou toe gedeporteerd. Party.Teleport.Target=&a{0} is naar jou toe geteleporteerd.
Party.Teleport.Disabled={0} staat groeps-teleportaties niet toe. Party.Teleport.Disabled={0} staat groeps-teleportaties niet toe.
Party.Rename.Same=Dat is al de naam van uw groep! Party.Rename.Same=Dat is al de naam van uw groep!
Party.Join.Self=Je kan niet meedoen met jezelf! Party.Join.Self=Je kan niet meedoen met jezelf!
@ -373,7 +373,7 @@ Commands.XPGain=&8XP GEWONNEN: &f{0}
Commands.xplock.locked=&6Jou XP BALK is nu bevroren op {0}! Commands.xplock.locked=&6Jou XP BALK is nu bevroren op {0}!
Commands.xplock.unlocked=&6Jou XP BALK is nu&aONTGRENDELD&6! Commands.xplock.unlocked=&6Jou XP BALK is nu&aONTGRENDELD&6!
Commands.xprate.over=mcMMO XP Verdubbeling Evenement is VOORBIJ!! Commands.xprate.over=mcMMO XP Verdubbeling Evenement is VOORBIJ!!
Commands.xprate.proper.0=Juiste gebruiking om de XP snelheid te veranderen is /xprate <integer> <true/false> Commands.xprate.proper.0=De juiste manier om de XP snelheid te veranderen is /xprate <integer> <true/false>
Commands.xprate.proper.1=De juiste manier om de XP rate te herstellen is /xprate reset Commands.xprate.proper.1=De juiste manier om de XP rate te herstellen is /xprate reset
Commands.xprate.started.0=&6XP EVENEMENT VOOR MCMMO IS BEGONNEN! Commands.xprate.started.0=&6XP EVENEMENT VOOR MCMMO IS BEGONNEN!
XPRate.Event=&6mcMMO is momenteel in een XP verdubbeling evenement! XP verdubbeling is {0}x! XPRate.Event=&6mcMMO is momenteel in een XP verdubbeling evenement! XP verdubbeling is {0}x!
@ -383,7 +383,7 @@ Effects.Parent=&6{0} -
Effects.Template=&3{0}: &a{1} Effects.Template=&3{0}: &a{1}
Guides.Header=&6-=&a{0} Handleiding&6=- Guides.Header=&6-=&a{0} Handleiding&6=-
Guides.Page.Invalid=Geen geldig paginanummer! Guides.Page.Invalid=Geen geldig paginanummer!
Guides.Page.OutOfRange=Deze pagina bestaat niet, er zijn in totaal {0} pagina\'s. Guides.Page.OutOfRange=Deze pagina bestaat niet. Er zijn in totaal {0} pagina\'s.
Guides.Smelting.Section.0=Komt binnenkort... Guides.Smelting.Section.0=Komt binnenkort...
Inspect.OfflineStats=mcMMO statistieken voor offline-speler &e{0} Inspect.OfflineStats=mcMMO statistieken voor offline-speler &e{0}
Inspect.Stats=&amcMMO Statistieken voor &e{0} Inspect.Stats=&amcMMO Statistieken voor &e{0}
@ -392,8 +392,8 @@ Item.ChimaeraWing.Fail=**CHIMAERA VLEUGEL MISLUKT**
Item.ChimaeraWing.Pass=**CHIMAERA VLEUGEL** Item.ChimaeraWing.Pass=**CHIMAERA VLEUGEL**
Item.ChimaeraWing.Name=Chimaera Vleugel Item.ChimaeraWing.Name=Chimaera Vleugel
Item.ChimaeraWing.Lore=&7 Teleporteert je naar je bed. Item.ChimaeraWing.Lore=&7 Teleporteert je naar je bed.
Item.Injured.Wait=Je bent recent gewond geraakt en je moet wachter om dit te gebruiken. &e({0}s) Item.Injured.Wait=Je bent recent gewond geraakt en je moet wachten om dit te gebruiken. &e({0}s)
Teleport.Commencing=&7Teleport poging in &6({0}) &7seconden, Sta stil AUB... Teleport.Commencing=&7Teleporteer poging in &6({0}) &7seconden, Sta stil AUB...
Skills.Disarmed=&4Je bent ontwapend! Skills.Disarmed=&4Je bent ontwapend!
Skills.NeedMore=&4Jij hebt te weinig &7{0} Skills.NeedMore=&4Jij hebt te weinig &7{0}
Skills.TooTired=Jij bent te moe om die kracht opnieuw te gebruiken. &e({0}s) Skills.TooTired=Jij bent te moe om die kracht opnieuw te gebruiken. &e({0}s)

File diff suppressed because it is too large Load Diff

View File

@ -6,244 +6,244 @@ Excavation:
Amount: 1 Amount: 1
XP: 3000 XP: 3000
Drop_Chance: 0.05 Drop_Chance: 0.05
Drop_Level: Level_Requirement:
Standard: 75 Standard_Mode: 75
Retro_Mode: 750 Retro_Mode: 750
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand, Soul_Soil] Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand, Soul_Soil]
GUNPOWDER: GUNPOWDER:
Amount: 1 Amount: 1
XP: 30 XP: 30
Drop_Chance: 10.0 Drop_Chance: 10.0
Drop_Level: Level_Requirement:
Standard: 10 Standard_Mode: 10
Retro_Mode: 1000 Retro_Mode: 1000
Drops_From: [Gravel] Drops_From: [Gravel]
BONE: BONE:
Amount: 1 Amount: 1
XP: 30 XP: 30
Drop_Chance: 10.0 Drop_Chance: 10.0
Drop_Level: Level_Requirement:
Standard: 20 Standard_Mode: 20
Retro_Mode: 200 Retro_Mode: 200
Drops_From: [Gravel] Drops_From: [Gravel]
APPLE: APPLE:
Amount: 1 Amount: 1
XP: 100 XP: 100
Drop_Chance: 0.1 Drop_Chance: 0.1
Drop_Level: Level_Requirement:
Standard: 25 Standard_Mode: 25
Retro_Mode: 250 Retro_Mode: 250
Drops_From: [Grass_Block, Mycelium] Drops_From: [Grass_Block, Mycelium]
SLIME_BALL: SLIME_BALL:
Amount: 1 Amount: 1
XP: 100 XP: 100
Drop_Chance: 5.0 Drop_Chance: 5.0
Drop_Level: Level_Requirement:
Standard: 15 Standard_Mode: 15
Retro_Mode: 150 Retro_Mode: 150
Drops_From: [Clay] Drops_From: [Clay]
BUCKET: BUCKET:
Amount: 1 Amount: 1
XP: 100 XP: 100
Drop_Chance: 0.1 Drop_Chance: 0.1
Drop_Level: Level_Requirement:
Standard: 50 Standard_Mode: 50
Retro_Mode: 500 Retro_Mode: 500
Drops_From: [Clay] Drops_From: [Clay]
NETHERRACK: NETHERRACK:
Amount: 1 Amount: 1
XP: 30 XP: 30
Drop_Chance: 0.5 Drop_Chance: 0.5
Drop_Level: Level_Requirement:
Standard: 85 Standard_Mode: 85
Retro_Mode: 850 Retro_Mode: 850
Drops_From: [Gravel] Drops_From: [Gravel]
RED_MUSHROOM: RED_MUSHROOM:
Amount: 1 Amount: 1
XP: 80 XP: 80
Drop_Chance: 0.5 Drop_Chance: 0.5
Drop_Level: Level_Requirement:
Standard: 50 Standard_Mode: 50
Retro_Mode: 500 Retro_Mode: 500
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Mycelium] Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Mycelium]
BROWN_MUSHROOM: BROWN_MUSHROOM:
Amount: 1 Amount: 1
XP: 80 XP: 80
Drop_Chance: 0.5 Drop_Chance: 0.5
Drop_Level: Level_Requirement:
Standard: 50 Standard_Mode: 50
Retro_Mode: 500 Retro_Mode: 500
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Mycelium] Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Mycelium]
EGG: EGG:
Amount: 1 Amount: 1
XP: 100 XP: 100
Drop_Chance: 1.0 Drop_Chance: 1.0
Drop_Level: Level_Requirement:
Standard: 25 Standard_Mode: 25
Retro_Mode: 250 Retro_Mode: 250
Drops_From: [Grass_Block] Drops_From: [Grass_Block]
SOUL_SAND: SOUL_SAND:
Amount: 1 Amount: 1
XP: 80 XP: 80
Drop_Chance: 0.5 Drop_Chance: 0.5
Drop_Level: Level_Requirement:
Standard: 65 Standard_Mode: 65
Retro_Mode: 650 Retro_Mode: 650
Drops_From: [Sand, Red_Sand] Drops_From: [Sand, Red_Sand]
CLOCK: CLOCK:
Amount: 1 Amount: 1
XP: 100 XP: 100
Drop_Chance: 0.1 Drop_Chance: 0.1
Drop_Level: Level_Requirement:
Standard: 50 Standard_Mode: 50
Retro_Mode: 500 Retro_Mode: 500
Drops_From: [Clay] Drops_From: [Clay]
COBWEB: COBWEB:
Amount: 1 Amount: 1
XP: 150 XP: 150
Drop_Chance: 5.0 Drop_Chance: 5.0
Drop_Level: Level_Requirement:
Standard: 75 Standard_Mode: 75
Retro_Mode: 750 Retro_Mode: 750
Drops_From: [Clay] Drops_From: [Clay]
STRING: STRING:
Amount: 1 Amount: 1
XP: 200 XP: 200
Drop_Chance: 5.0 Drop_Chance: 5.0
Drop_Level: Level_Requirement:
Standard: 25 Standard_Mode: 25
Retro_Mode: 250 Retro_Mode: 250
Drops_From: [Clay] Drops_From: [Clay]
GLOWSTONE_DUST: GLOWSTONE_DUST:
Amount: 1 Amount: 1
XP: 80 XP: 80
Drop_Chance: 5.0 Drop_Chance: 5.0
Drop_Level: Level_Requirement:
Standard: 5 Standard_Mode: 5
Retro_Mode: 50 Retro_Mode: 50
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Mycelium] Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Mycelium]
MUSIC_DISC_13: MUSIC_DISC_13:
Amount: 1 Amount: 1
XP: 3000 XP: 3000
Drop_Chance: 0.05 Drop_Chance: 0.05
Drop_Level: Level_Requirement:
Standard: 25 Standard_Mode: 25
Retro_Mode: 250 Retro_Mode: 250
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand, Soul_Soil] Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand, Soul_Soil]
MUSIC_DISC_CAT: MUSIC_DISC_CAT:
Amount: 1 Amount: 1
XP: 3000 XP: 3000
Drop_Chance: 0.05 Drop_Chance: 0.05
Drop_Level: Level_Requirement:
Standard: 25 Standard_Mode: 25
Retro_Mode: 250 Retro_Mode: 250
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand, Soul_Soil] Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand, Soul_Soil]
DIAMOND: DIAMOND:
Amount: 1 Amount: 1
XP: 1000 XP: 1000
Drop_Chance: 0.13 Drop_Chance: 0.13
Drop_Level: Level_Requirement:
Standard: 35 Standard_Mode: 35
Retro_Mode: 350 Retro_Mode: 350
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand, Soul_Soil] Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand, Soul_Soil]
COCOA_BEANS: COCOA_BEANS:
Amount: 1 Amount: 1
XP: 100 XP: 100
Drop_Chance: 1.33 Drop_Chance: 1.33
Drop_Level: Level_Requirement:
Standard: 35 Standard_Mode: 35
Retro_Mode: 350 Retro_Mode: 350
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Mycelium] Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Mycelium]
QUARTZ: QUARTZ:
Amount: 1 Amount: 1
XP: 100 XP: 100
Drop_Chance: 0.5 Drop_Chance: 0.5
Drop_Level: Level_Requirement:
Standard: 85 Standard_Mode: 85
Retro_Mode: 850 Retro_Mode: 850
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Mycelium, Soul_Sand, Soul_Soil] Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Mycelium, Soul_Sand, Soul_Soil]
NAME_TAG: NAME_TAG:
Amount: 1 Amount: 1
XP: 3000 XP: 3000
Drop_Chance: 0.05 Drop_Chance: 0.05
Drop_Level: Level_Requirement:
Standard: 25 Standard_Mode: 25
Retro_Mode: 250 Retro_Mode: 250
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand, Soul_Soil] Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand, Soul_Soil]
# #
# Settings for Hylian Luck # Settings for Hylian Luck
# If you are in retro mode, Drop_Level is multiplied by 10. # If you are in retro mode, Level_Requirement is multiplied by 10.
### ###
Hylian_Luck: Hylian_Luck:
MELON_SEEDS: MELON_SEEDS:
Amount: 1 Amount: 1
XP: 0 XP: 0
Drop_Chance: 100.0 Drop_Chance: 100.0
Drop_Level: Level_Requirement:
Standard: 0 Standard_Mode: 0
Retro_Mode: 0 Retro_Mode: 0
Drops_From: [Bushes] Drops_From: [Bushes]
PUMPKIN_SEEDS: PUMPKIN_SEEDS:
Amount: 1 Amount: 1
XP: 0 XP: 0
Drop_Chance: 100.0 Drop_Chance: 100.0
Drop_Level: Level_Requirement:
Standard: 0 Standard_Mode: 0
Retro_Mode: 0 Retro_Mode: 0
Drops_From: [Bushes] Drops_From: [Bushes]
COCOA_BEANS: COCOA_BEANS:
Amount: 1 Amount: 1
XP: 0 XP: 0
Drop_Chance: 100.0 Drop_Chance: 100.0
Drop_Level: Level_Requirement:
Standard: 0 Standard_Mode: 0
Retro_Mode: 0 Retro_Mode: 0
Drops_From: [Bushes] Drops_From: [Bushes]
CARROT: CARROT:
Amount: 1 Amount: 1
XP: 0 XP: 0
Drop_Chance: 100.0 Drop_Chance: 100.0
Drop_Level: Level_Requirement:
Standard: 0 Standard_Mode: 0
Retro_Mode: 0 Retro_Mode: 0
Drops_From: [Flowers] Drops_From: [Flowers]
POTATO: POTATO:
Amount: 1 Amount: 1
XP: 0 XP: 0
Drop_Chance: 100.0 Drop_Chance: 100.0
Drop_Level: Level_Requirement:
Standard: 0 Standard_Mode: 0
Retro_Mode: 0 Retro_Mode: 0
Drops_From: [Flowers] Drops_From: [Flowers]
APPLE: APPLE:
Amount: 1 Amount: 1
XP: 0 XP: 0
Drop_Chance: 100.0 Drop_Chance: 100.0
Drop_Level: Level_Requirement:
Standard: 0 Standard_Mode: 0
Retro_Mode: 0 Retro_Mode: 0
Drops_From: [Flowers] Drops_From: [Flowers]
EMERALD: EMERALD:
Amount: 1 Amount: 1
XP: 0 XP: 0
Drop_Chance: 100.0 Drop_Chance: 100.0
Drop_Level: Level_Requirement:
Standard: 0 Standard_Mode: 0
Retro_Mode: 0 Retro_Mode: 0
Drops_From: [Pots] Drops_From: [Pots]
DIAMOND: DIAMOND:
Amount: 1 Amount: 1
XP: 0 XP: 0
Drop_Chance: 100.0 Drop_Chance: 100.0
Drop_Level: Level_Requirement:
Standard: 0 Standard_Mode: 0
Retro_Mode: 0 Retro_Mode: 0
Drops_From: [Pots] Drops_From: [Pots]
GOLD_NUGGET: GOLD_NUGGET:
Amount: 1 Amount: 1
XP: 0 XP: 0
Drop_Chance: 100.0 Drop_Chance: 100.0
Drop_Level: Level_Requirement:
Standard: 0 Standard_Mode: 0
Retro_Mode: 0 Retro_Mode: 0
Drops_From: [Pots] Drops_From: [Pots]