From 70756c2a2ef5c003c9b536e958128ab4795b28b7 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sat, 11 Feb 2012 10:21:36 -0800 Subject: [PATCH] Preparing for a bugfix release. Also made sure mcMMO saves info on shutdown. --- Changelog.txt | 11 +++++--- pom.xml | 2 +- src/main/java/com/gmail/nossr50/Combat.java | 6 ----- .../nossr50/listeners/mcEntityListener.java | 8 ++++-- src/main/java/com/gmail/nossr50/mcMMO.java | 25 ++++++++----------- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 7d94cbd99..1060d5eee 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,12 +1,17 @@ Changelog: #Versions without changelogs probably had very small misc fixes, like tweaks to the source code -Version 2.0-dev +Version 1.2.11 - Removed legacy Permission & PEX support. SuperPerms support only now. - - Added framework for new Mining sub-skill: Blast Mining. - Made Smooth Brick to Mossy Brick and Dirt to Grass for green thumb configurable (Issue #120) - - Changed mcMMO to save data periodically to optimize performance with FlatFile & MySQL + - Added MagmaCube to XP tables + - Made optimizations to Skull Splitter/Serrated Strikes + - Made it so players take damage if they try to log out with Serrated Strikes stacked onto them (Issue #131) + - Changed mcMMO to save data periodically to optimize performance with FlatFile & MySQL (Issue #138) - Added a configurable save interval for the new save system + - Fixed a bug with the odds calculations for Serrated Strikes + - Fixed several commands not working from console (mmoedit, etc..) (Issue #150) + - Added a success message when executing xprate from console Version 1.2.10 - Fixed issue with receiving Woodcutting XP for all blocks broken (Issue #103) diff --git a/pom.xml b/pom.xml index 606e431e7..e7ec6a0d0 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.gmail.nossr50.mcMMO mcMMO - 2.0-dev + 1.2.11 mcMMO https://github.com/TheYeti/mcMMO diff --git a/src/main/java/com/gmail/nossr50/Combat.java b/src/main/java/com/gmail/nossr50/Combat.java index 1083be8c0..9fed58edc 100644 --- a/src/main/java/com/gmail/nossr50/Combat.java +++ b/src/main/java/com/gmail/nossr50/Combat.java @@ -118,12 +118,6 @@ public class Combat int xp = (int) (xpinc * 2 * LoadProperties.pvpxprewardmodifier); - if(xp < 0) - { - //Debug messages here - xp = Math.abs(xp); //Temporary fix - } - if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker)) PPa.addXP(SkillType.AXES, xp*10, attacker); if(m.isSwords(attacker.getItemInHand()) && mcPermissions.getInstance().swords(attacker)) diff --git a/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java b/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java index 49df3a741..20c6bb8b8 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java @@ -84,7 +84,7 @@ public class mcEntityListener implements Listener /* * Demolitions Expert - */ + if(event.getCause() == DamageCause.BLOCK_EXPLOSION) { if(event.getEntity() instanceof Player) @@ -93,6 +93,7 @@ public class mcEntityListener implements Listener BlastMining.demolitionsExpertise(player, event); } } + */ if(event.getEntity() instanceof LivingEntity) { @@ -213,6 +214,7 @@ public class mcEntityListener implements Listener } } + /* @EventHandler (priority = EventPriority.LOW) public void onExplosionPrime(ExplosionPrimeEvent event) { @@ -228,6 +230,7 @@ public class mcEntityListener implements Listener } } + @EventHandler (priority = EventPriority.LOW) public void onEnitityExplode(EntityExplodeEvent event) { @@ -242,7 +245,8 @@ public class mcEntityListener implements Listener } } } - + */ + public boolean isBow(ItemStack is){ if (is.getTypeId() == 261){ return true; diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index c8f39af4e..695dca2e6 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -166,17 +166,6 @@ public class mcMMO extends JavaPlugin FileManager FM = SpoutManager.getFileManager(); FM.addToPreLoginCache(this, SpoutStuff.getFiles()); - - /* - Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, - new Runnable() { - - @Override - public void run() { - mmoHelper.updateAll(); - } - }, 20, 20); - */ } } @@ -239,9 +228,17 @@ public class mcMMO extends JavaPlugin return PP.inParty(); } - public void onDisable() { - Bukkit.getServer().getScheduler().cancelTasks(this); - System.out.println("mcMMO was disabled."); + public void onDisable() + { + //Make sure to save player information if the server shuts down + for(Player x : Bukkit.getServer().getOnlinePlayers()) + { + Users.getProfile(x).save(); + } + + Bukkit.getServer().getScheduler().cancelTasks(this); //This removes our tasks + + System.out.println("mcMMO was disabled."); //How informative! } private void registerCommands() {