diff --git a/mcMMO/Changelog.txt b/mcMMO/Changelog.txt index 8c09bfabb..6707e604f 100644 --- a/mcMMO/Changelog.txt +++ b/mcMMO/Changelog.txt @@ -1,5 +1,9 @@ Changelog: #Versions without changelogs probably had very small misc fixes, like tweaks to the source code# +Version 0.9.2 +Changed priority of some of the mcMMO listeners +Now when certain abilities are activated it shouldn't say "You lower your x" + Version 0.9.1 Fixed "Unknown console command" errors with CB 556 Added /mcability command to toggle being able to trigger abilities with right click diff --git a/mcMMO/com/gmail/nossr50/mcAcrobatics.java b/mcMMO/com/gmail/nossr50/mcAcrobatics.java index 4a314b3ec..2d59570c1 100644 --- a/mcMMO/com/gmail/nossr50/mcAcrobatics.java +++ b/mcMMO/com/gmail/nossr50/mcAcrobatics.java @@ -1,6 +1,5 @@ package com.gmail.nossr50; -import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.entity.EntityDamageEvent; diff --git a/mcMMO/com/gmail/nossr50/mcExcavation.java b/mcMMO/com/gmail/nossr50/mcExcavation.java index 50fc435a6..ab16565f9 100644 --- a/mcMMO/com/gmail/nossr50/mcExcavation.java +++ b/mcMMO/com/gmail/nossr50/mcExcavation.java @@ -25,7 +25,10 @@ public class mcExcavation { if(!mcm.getInstance().abilityBlockCheck(block)) return; } - + if(mcUsers.getProfile(player).getShovelPreparationMode()){ + mcUsers.getProfile(player).setShovelPreparationMode(false); + mcUsers.getProfile(player).setShovelPreparationTicks(0); + } int ticks = 2; if(mcUsers.getProfile(player).getExcavationInt() >= 50) ticks++; diff --git a/mcMMO/com/gmail/nossr50/mcMMO.java b/mcMMO/com/gmail/nossr50/mcMMO.java index 1f7700419..11c973927 100644 --- a/mcMMO/com/gmail/nossr50/mcMMO.java +++ b/mcMMO/com/gmail/nossr50/mcMMO.java @@ -30,7 +30,6 @@ public class mcMMO extends JavaPlugin { private Permissions permissions; private Timer mcMMO_Timer = new Timer(true); - //herp public void onEnable() { mcMMO_Timer.schedule(new mcTimer(this), 0, (long)(2000)); //Make the directory if it does not exist @@ -67,16 +66,16 @@ public class mcMMO extends JavaPlugin { PluginManager pm = getServer().getPluginManager(); pm.registerEvent(Event.Type.PLAYER_JOIN, playerListener, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_LOGIN, playerListener, Priority.Normal, this); - pm.registerEvent(Event.Type.BLOCK_DAMAGED, blockListener, Priority.Low, this); - pm.registerEvent(Event.Type.PLAYER_CHAT, playerListener, Priority.Monitor, this); - pm.registerEvent(Event.Type.PLAYER_COMMAND_PREPROCESS, playerListener, Priority.High, this); + pm.registerEvent(Event.Type.BLOCK_DAMAGED, blockListener, Priority.Highest, this); + pm.registerEvent(Event.Type.PLAYER_CHAT, playerListener, Priority.Low, this); + pm.registerEvent(Event.Type.PLAYER_COMMAND_PREPROCESS, playerListener, Priority.Normal, this); pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Priority.Normal, this); pm.registerEvent(Event.Type.BLOCK_FLOW, blockListener, Priority.Normal, this); pm.registerEvent(Event.Type.BLOCK_PLACED, blockListener, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_ITEM, playerListener, Priority.Monitor, this); pm.registerEvent(Event.Type.PLAYER_RESPAWN, playerListener, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_ITEM_HELD, playerListener, Priority.Normal, this); - pm.registerEvent(Event.Type.ENTITY_DAMAGED, entityListener, Priority.Low, this); + pm.registerEvent(Event.Type.ENTITY_DAMAGED, entityListener, Priority.Highest, this); pm.registerEvent(Event.Type.BLOCK_RIGHTCLICKED, blockListener, Priority.Normal, this); //pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Priority.Normal, this); //Displays a message when plugin is loaded diff --git a/mcMMO/com/gmail/nossr50/mcSkills.java b/mcMMO/com/gmail/nossr50/mcSkills.java index f766a6f01..143486765 100644 --- a/mcMMO/com/gmail/nossr50/mcSkills.java +++ b/mcMMO/com/gmail/nossr50/mcSkills.java @@ -112,10 +112,7 @@ public class mcSkills { mcUsers.getProfile(player).setFistsPreparationMode(true); } if((mcPermissions.getInstance().axes(player) || mcPermissions.getInstance().woodcutting(player)) && !mcUsers.getProfile(player).getAxePreparationMode()){ - if(!mcUsers.getProfile(player).getAxePreparationMode() && mcm.getInstance().isAxes(player.getItemInHand())){ - if(!mcUsers.getProfile(player).getSkullSplitterMode() && mcUsers.getProfile(player).getSkullSplitterCooldown() >= 1){ - player.sendMessage(ChatColor.RED+"You are too tired to use that ability again."); - } + if(mcm.getInstance().isAxes(player.getItemInHand())){ player.sendMessage(ChatColor.GREEN+"**YOU READY YOUR AXE**"); mcUsers.getProfile(player).setAxePreparationTicks(2); mcUsers.getProfile(player).setAxePreparationMode(true); @@ -124,7 +121,10 @@ public class mcSkills { } public void serratedStrikesActivationCheck(Player player){ if(mcm.getInstance().isSwords(player.getItemInHand())){ - + if(mcUsers.getProfile(player).getSwordsPreparationMode()){ + mcUsers.getProfile(player).setSwordsPreparationMode(false); + mcUsers.getProfile(player).setSwordsPreparationTicks(0); + } int ticks = 2; if(mcUsers.getProfile(player).getSwordsInt() >= 50) ticks++; @@ -153,7 +153,10 @@ public class mcSkills { } public void berserkActivationCheck(Player player){ if(player.getItemInHand().getTypeId() == 0){ - + if(mcUsers.getProfile(player).getFistsPreparationMode()){ + mcUsers.getProfile(player).setFistsPreparationMode(false); + mcUsers.getProfile(player).setFistsPreparationTicks(0); + } int ticks = 2; if(mcUsers.getProfile(player).getUnarmedInt() >= 50) ticks++; diff --git a/mcMMO/plugin.yml b/mcMMO/plugin.yml index 1690a418f..0e3e0cf3f 100644 --- a/mcMMO/plugin.yml +++ b/mcMMO/plugin.yml @@ -1,3 +1,3 @@ name: mcMMO main: com.gmail.nossr50.mcMMO -version: 0.9.1 \ No newline at end of file +version: 0.9.2 \ No newline at end of file