Fixed Tree Feller not playing nice with NoCheat

This commit is contained in:
GJ 2012-02-16 12:15:05 -05:00
parent 7003311b7e
commit c942feb868
4 changed files with 19 additions and 16 deletions

View File

@ -1,5 +1,6 @@
Changelog: Changelog:
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code #Versions without changelogs probably had very small misc fixes, like tweaks to the source code
Version 1.3.00-dev Version 1.3.00-dev
- Fixed /mcability not respecting permissions - Fixed /mcability not respecting permissions
- Changed to use Bukkit's built-in ignoreCancelledEvents system - Changed to use Bukkit's built-in ignoreCancelledEvents system
@ -7,6 +8,8 @@ Version 1.3.00-dev
- Added configuration option to control mcMMO reporting damage events - Added configuration option to control mcMMO reporting damage events
- Added hunger regain bonuses to Herbalism skill - Added hunger regain bonuses to Herbalism skill
- Changed chat logging for /p & /a - Changed chat logging for /p & /a
- Fixed Tree Feller not playing nice with NoCheat
- Added framework for new Blast Mining skill
Version 1.2.12 Version 1.2.12
- Fixed issue that caused terrible MySQL performance and negative XP on levelup (Issue #134) - Fixed issue that caused terrible MySQL performance and negative XP on levelup (Issue #134)
@ -19,7 +22,6 @@ Version 1.2.12
- Fixed config.yml not having values for End Stone & other new mining blocks - Fixed config.yml not having values for End Stone & other new mining blocks
- Fixed Green Thumb/Green Terra not correctly planting wheat (Issue #133) - Fixed Green Thumb/Green Terra not correctly planting wheat (Issue #133)
Version 1.2.11 Version 1.2.11
- Removed legacy Permission & PEX dependency. (PEX still works fine with mcMMO) - Removed legacy Permission & PEX dependency. (PEX still works fine with mcMMO)
- Made Smooth Brick to Mossy Brick and Dirt to Grass for green thumb configurable (Issue #120) - Made Smooth Brick to Mossy Brick and Dirt to Grass for green thumb configurable (Issue #120)

View File

@ -3,10 +3,10 @@
<groupId>com.gmail.nossr50.mcMMO</groupId> <groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId> <artifactId>mcMMO</artifactId>
<name>mcMMO</name> <name>mcMMO</name>
<url>https://github.com/TheYeti/mcMMO</url> <url>https://github.com/mcMMO-Dev/mcMMO</url>
<issueManagement> <issueManagement>
<system>GitHub</system> <url>http://issues.mcmmo.org</url>
<url>https://github.com/TheYeti/mcMMO/issues</url> <system>JIRA</system>
</issueManagement> </issueManagement>
<build> <build>
<finalName>mcMMO</finalName> <finalName>mcMMO</finalName>
@ -121,5 +121,5 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<version>2.0.00-dev</version> <version>1.3.00-dev</version>
</project> </project>

View File

@ -93,11 +93,11 @@ public class mcBlockListener implements Listener
if (id == 17 || id == 73 || id == 74 || id == 81 || id == 83 || id == 86 || id == 91 || id == 106 || id == 98) if (id == 17 || id == 73 || id == 74 || id == 81 || id == 83 || id == 86 || id == 91 || id == 106 || id == 98)
plugin.misc.blockWatchList.add(block); plugin.misc.blockWatchList.add(block);
else { else {
//block.setData((byte) 5); //Change the byte block.setData((byte) 5); //Change the byte
//The following is a method to get around a breakage in 1.1-R2 and onward //The following is a method to get around a breakage in 1.1-R2 and onward
//it should be removed as soon as functionality to change a block //it should be removed as soon as functionality to change a block
//in this event returns. //in this event returns.
plugin.changeQueue.push(block); // plugin.changeQueue.push(block);
} }
} }
@ -151,10 +151,10 @@ public class mcBlockListener implements Listener
*/ */
//TNT removal checks - needed for Blast Mining //TNT removal checks - needed for Blast Mining
if(block.getTypeId() == 46) // if(block.getTypeId() == 46 && inhand != )
{ // {
plugin.misc.tntTracker.remove(block); // plugin.misc.tntTracker.remove(block);
} // }
//Green Terra //Green Terra
if(PP.getHoePreparationMode() && mcPermissions.getInstance().herbalismAbility(player) && block.getTypeId() == 59 && block.getData() == (byte) 0x07) if(PP.getHoePreparationMode() && mcPermissions.getInstance().herbalismAbility(player) && block.getTypeId() == 59 && block.getData() == (byte) 0x07)
@ -216,6 +216,9 @@ public class mcBlockListener implements Listener
if(LoadProperties.spoutEnabled) if(LoadProperties.spoutEnabled)
SpoutStuff.playSoundForPlayer(SoundEffect.EXPLODE, player, block.getLocation()); SpoutStuff.playSoundForPlayer(SoundEffect.EXPLODE, player, block.getLocation());
PlayerAnimationEvent armswing = new PlayerAnimationEvent(player);
Bukkit.getPluginManager().callEvent(armswing);
WoodCutting.treeFeller(block, player, plugin); WoodCutting.treeFeller(block, player, plugin);
for(Block blockx : plugin.misc.treeFeller) for(Block blockx : plugin.misc.treeFeller)
{ {
@ -283,8 +286,6 @@ public class mcBlockListener implements Listener
plugin.misc.blockWatchList.remove(block); plugin.misc.blockWatchList.remove(block);
} }
} }
//System.out.println("DEBUG: "+event.isCancelled()+", BLOCK_TYPE: "+event.getBlock().getType().toString()+", BLOCK_DATA: "+event.getBlock().getData());
} }
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)

View File

@ -240,7 +240,7 @@ public class mcEntityListener implements Listener
} }
} }
@EventHandler (priority = EventPriority.MONITOR) @EventHandler (priority = EventPriority.LOW)
public void onFoodLevelChange(FoodLevelChangeEvent event) public void onFoodLevelChange(FoodLevelChangeEvent event)
{ {
if(event.getEntity() instanceof Player) if(event.getEntity() instanceof Player)