diff --git a/mcMMO/Changelog.txt b/mcMMO/Changelog.txt index 9f2e7e6b4..7cfad2f51 100644 --- a/mcMMO/Changelog.txt +++ b/mcMMO/Changelog.txt @@ -1,7 +1,14 @@ Changelog: #Versions without changelogs probably had very small misc fixes, like tweaks to the source code# +Version 0.9.16 +Logs placed by the player won't grant XP/Double Drops anymore +Added more functions plugin authors can call +Acrobatics roll has a damage threshold of 20, going above this means a failed Roll + + Version 0.9.15 -AoE Abilities will only hit wolves attacking you +Acrobatics will now behave properly +AoE Abilities ignore wolves (temp fix) Added "all" parameter to /mmoedit & /addxp After giving XP to a player it will now check for level ups in skills diff --git a/mcMMO/com/gmail/nossr50/mcAcrobatics.java b/mcMMO/com/gmail/nossr50/mcAcrobatics.java index 77948487a..4dd56c6c4 100644 --- a/mcMMO/com/gmail/nossr50/mcAcrobatics.java +++ b/mcMMO/com/gmail/nossr50/mcAcrobatics.java @@ -4,6 +4,7 @@ import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.entity.EntityDamageEvent; + public class mcAcrobatics { private static volatile mcAcrobatics instance; public static mcAcrobatics getInstance() { @@ -13,7 +14,7 @@ public class mcAcrobatics { return instance; } public void acrobaticsCheck(Player player, EntityDamageEvent event, Location loc, int xx, int y, int z){ - if(player != null && mcPermissions.getInstance().acrobatics(player)){ + if(player != null && mcPermissions.getInstance().acrobatics(player)&& event.getDamage() < 21){ if(Math.random() * 1000 <= mcUsers.getProfile(player).getAcrobaticsInt()){ player.sendMessage("**ROLLED**"); if(!mcConfig.getInstance().isBlockWatched(loc.getWorld().getBlockAt(xx, y, z))){ diff --git a/mcMMO/com/gmail/nossr50/mcBlockListener.java b/mcMMO/com/gmail/nossr50/mcBlockListener.java index 74b7012bb..7cf649b56 100644 --- a/mcMMO/com/gmail/nossr50/mcBlockListener.java +++ b/mcMMO/com/gmail/nossr50/mcBlockListener.java @@ -12,6 +12,7 @@ import org.bukkit.event.block.BlockListener; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.inventory.ItemStack; + public class mcBlockListener extends BlockListener { private final mcMMO plugin; diff --git a/mcMMO/com/gmail/nossr50/mcCombat.java b/mcMMO/com/gmail/nossr50/mcCombat.java index 1421f2ac6..8a8898491 100644 --- a/mcMMO/com/gmail/nossr50/mcCombat.java +++ b/mcMMO/com/gmail/nossr50/mcCombat.java @@ -18,6 +18,7 @@ import org.bukkit.event.entity.EntityDamageByProjectileEvent; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.inventory.ItemStack; + public class mcCombat { private static mcMMO plugin; public mcCombat(mcMMO instance) { @@ -514,13 +515,10 @@ public class mcCombat { target.damage(event.getDamage() / 2); targets--; } - if(derp instanceof Animals && targets >= 1){ - if(derp instanceof Wolf){ - if(((Wolf) derp).isAngry() && ((Wolf) derp).getTarget() != attacker){ - continue; - } - } - + if(derp instanceof Wolf){ + continue; + } + if(derp instanceof Animals && targets >= 1){ Animals target = (Animals)derp; target.damage(event.getDamage() / 2); targets--; @@ -551,9 +549,10 @@ public class mcCombat { target.damage(event.getDamage() / 4); targets--; } + if(derp instanceof Wolf){ + continue; + } if(derp instanceof Animals && targets >= 1){ - if(derp instanceof Wolf) - continue; if(!mcConfig.getInstance().isBleedTracked(derp)) mcConfig.getInstance().addToBleedQue(x); Animals target = (Animals)derp; diff --git a/mcMMO/com/gmail/nossr50/mcEntityListener.java b/mcMMO/com/gmail/nossr50/mcEntityListener.java index b59d64f62..abe4c5488 100644 --- a/mcMMO/com/gmail/nossr50/mcEntityListener.java +++ b/mcMMO/com/gmail/nossr50/mcEntityListener.java @@ -20,6 +20,7 @@ import org.bukkit.event.entity.EntityListener; import org.bukkit.inventory.ItemStack; import org.bukkit.util.Vector; + public class mcEntityListener extends EntityListener { private final mcMMO plugin; diff --git a/mcMMO/com/gmail/nossr50/mcExcavation.java b/mcMMO/com/gmail/nossr50/mcExcavation.java index 18a75de7c..6da795e79 100644 --- a/mcMMO/com/gmail/nossr50/mcExcavation.java +++ b/mcMMO/com/gmail/nossr50/mcExcavation.java @@ -7,6 +7,7 @@ import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; + public class mcExcavation { private static mcMMO plugin; public mcExcavation(mcMMO instance) { diff --git a/mcMMO/com/gmail/nossr50/mcHerbalism.java b/mcMMO/com/gmail/nossr50/mcHerbalism.java index 812e31c63..864c223b2 100644 --- a/mcMMO/com/gmail/nossr50/mcHerbalism.java +++ b/mcMMO/com/gmail/nossr50/mcHerbalism.java @@ -7,6 +7,7 @@ import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; + public class mcHerbalism { private static mcMMO plugin; public mcHerbalism(mcMMO instance) { diff --git a/mcMMO/com/gmail/nossr50/mcItem.java b/mcMMO/com/gmail/nossr50/mcItem.java index 463ae0377..476cbc480 100644 --- a/mcMMO/com/gmail/nossr50/mcItem.java +++ b/mcMMO/com/gmail/nossr50/mcItem.java @@ -6,6 +6,7 @@ import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; + public class mcItem { private static mcMMO plugin; public mcItem(mcMMO instance) { diff --git a/mcMMO/com/gmail/nossr50/mcMMO.java b/mcMMO/com/gmail/nossr50/mcMMO.java index 3e94f0000..4c3b7291a 100644 --- a/mcMMO/com/gmail/nossr50/mcMMO.java +++ b/mcMMO/com/gmail/nossr50/mcMMO.java @@ -1,4 +1,5 @@ package com.gmail.nossr50; + import com.nijikokun.bukkit.Permissions.Permissions; import com.nijiko.Messaging; import com.nijiko.permissions.PermissionHandler; @@ -24,7 +25,6 @@ public class mcMMO extends JavaPlugin { private final mcPlayerListener playerListener = new mcPlayerListener(this); private final mcBlockListener blockListener = new mcBlockListener(this); private final mcEntityListener entityListener = new mcEntityListener(this); - //private final mcServerListener serverListener = new mcServerListener(this); private final String name = "mcMMO"; public static PermissionHandler PermissionsHandler = null; private Permissions permissions; @@ -32,9 +32,8 @@ public class mcMMO extends JavaPlugin { public void onEnable() { mcMMO_Timer.schedule(new mcTimer(this), 0, (long)(1000)); - //Make the directory if it does not exist new File(maindirectory).mkdir(); - //Make the file if it does not exist + if(!Properties.exists()){ try { Properties.createNewFile(); @@ -78,8 +77,6 @@ public class mcMMO extends JavaPlugin { pm.registerEvent(Event.Type.PLAYER_ITEM_HELD, playerListener, Priority.Normal, this); pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Priority.Highest, this); - //pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Priority.Normal, this); - //Displays a message when plugin is loaded PluginDescriptionFile pdfFile = this.getDescription(); mcPermissions.initialize(getServer()); System.out.println( pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" ); @@ -94,7 +91,7 @@ public class mcMMO extends JavaPlugin { this.getServer().getPluginManager().disablePlugin(this); } } - } + } public boolean isPartyChatToggled(Player player){ if(mcConfig.getInstance().isPartyToggled(player.getName())){ return true; @@ -113,6 +110,12 @@ public class mcMMO extends JavaPlugin { return false; } } + public void addXp(Player player, String skillname, Integer newvalue){ + mcUsers.getProfile(player).addXpToSkill(newvalue, skillname); + } + public void modifySkill(Player player, String skillname, Integer newvalue){ + mcUsers.getProfile(player).modifyskill(newvalue, skillname); + } public boolean isAdminChatToggled(Player player){ if(mcConfig.getInstance().isAdminToggled(player.getName())){ return true; diff --git a/mcMMO/com/gmail/nossr50/mcMining.java b/mcMMO/com/gmail/nossr50/mcMining.java index 259666e41..7ce84a395 100644 --- a/mcMMO/com/gmail/nossr50/mcMining.java +++ b/mcMMO/com/gmail/nossr50/mcMining.java @@ -7,6 +7,7 @@ import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; + public class mcMining { private static mcMMO plugin; public mcMining(mcMMO instance) { diff --git a/mcMMO/com/gmail/nossr50/mcParty.java b/mcMMO/com/gmail/nossr50/mcParty.java index 633cbfa9f..7dd22fe45 100644 --- a/mcMMO/com/gmail/nossr50/mcParty.java +++ b/mcMMO/com/gmail/nossr50/mcParty.java @@ -3,6 +3,7 @@ package com.gmail.nossr50; import org.bukkit.ChatColor; import org.bukkit.entity.Player; + public class mcParty { private static mcMMO plugin; public mcParty(mcMMO instance) { diff --git a/mcMMO/com/gmail/nossr50/mcPlayerListener.java b/mcMMO/com/gmail/nossr50/mcPlayerListener.java index fa3f4e3dd..f16cdedfa 100644 --- a/mcMMO/com/gmail/nossr50/mcPlayerListener.java +++ b/mcMMO/com/gmail/nossr50/mcPlayerListener.java @@ -19,6 +19,7 @@ import org.bukkit.event.player.PlayerLoginEvent; import org.bukkit.event.player.PlayerRespawnEvent; import org.bukkit.inventory.ItemStack; + public class mcPlayerListener extends PlayerListener { protected static final Logger log = Logger.getLogger("Minecraft"); public Location spawn = null; @@ -241,7 +242,6 @@ public class mcPlayerListener extends PlayerListener { mcUsers.getProfile(getPlayer(split[1])).addXpToSkill(newvalue, split[2]); getPlayer(split[1]).sendMessage(ChatColor.GREEN+"Experience granted!"); player.sendMessage(ChatColor.RED+split[2]+" has been modified."); - mcSkills.getInstance().XpCheck(getPlayer(split[1])); } } else if(split.length == 3){ @@ -249,7 +249,6 @@ public class mcPlayerListener extends PlayerListener { int newvalue = Integer.valueOf(split[2]); mcUsers.getProfile(player).addXpToSkill(newvalue, split[1]); player.sendMessage(ChatColor.RED+split[1]+" has been modified."); - mcSkills.getInstance().XpCheck(player); } } else { player.sendMessage(ChatColor.RED+"Usage is /"+mcLoadProperties.addxp+" playername skillname xp"); diff --git a/mcMMO/com/gmail/nossr50/mcRepair.java b/mcMMO/com/gmail/nossr50/mcRepair.java index 1a73fc10b..4275b07a4 100644 --- a/mcMMO/com/gmail/nossr50/mcRepair.java +++ b/mcMMO/com/gmail/nossr50/mcRepair.java @@ -5,6 +5,7 @@ import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; + public class mcRepair { private static mcMMO plugin; public mcRepair(mcMMO instance) { diff --git a/mcMMO/com/gmail/nossr50/mcSkills.java b/mcMMO/com/gmail/nossr50/mcSkills.java index 0776a7051..d95c33e6c 100644 --- a/mcMMO/com/gmail/nossr50/mcSkills.java +++ b/mcMMO/com/gmail/nossr50/mcSkills.java @@ -6,6 +6,7 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; + public class mcSkills { private static mcMMO plugin; public mcSkills(mcMMO instance) { diff --git a/mcMMO/com/gmail/nossr50/mcTimer.java b/mcMMO/com/gmail/nossr50/mcTimer.java index 5ae6991d2..35b4ad1d5 100644 --- a/mcMMO/com/gmail/nossr50/mcTimer.java +++ b/mcMMO/com/gmail/nossr50/mcTimer.java @@ -5,6 +5,7 @@ import java.util.TimerTask; import org.bukkit.ChatColor; import org.bukkit.entity.*; + public class mcTimer extends TimerTask{ private final mcMMO plugin; int thecount = 1; diff --git a/mcMMO/com/gmail/nossr50/mcUsers.java b/mcMMO/com/gmail/nossr50/mcUsers.java index baa6a808a..05e7b827b 100644 --- a/mcMMO/com/gmail/nossr50/mcUsers.java +++ b/mcMMO/com/gmail/nossr50/mcUsers.java @@ -10,6 +10,7 @@ import org.bukkit.Location; import org.bukkit.entity.*; import org.bukkit.plugin.Plugin; + public class mcUsers { private static volatile mcUsers instance; protected static final Logger log = Logger.getLogger("Minecraft"); @@ -1503,6 +1504,7 @@ class PlayerList axesgather = String.valueOf(Integer.valueOf(axesgather)+newvalue); } save(); + mcSkills.getInstance().XpCheck(thisplayer); } public void modifyskill(int newvalue, String skillname){ if(skillname.toLowerCase().equals("mining")){ diff --git a/mcMMO/com/gmail/nossr50/mcWoodCutting.java b/mcMMO/com/gmail/nossr50/mcWoodCutting.java index ceda06604..553142021 100644 --- a/mcMMO/com/gmail/nossr50/mcWoodCutting.java +++ b/mcMMO/com/gmail/nossr50/mcWoodCutting.java @@ -9,6 +9,7 @@ import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; + public class mcWoodCutting { int w = 0; private boolean isdone = false; diff --git a/mcMMO/com/gmail/nossr50/mcm.java b/mcMMO/com/gmail/nossr50/mcm.java index b03ed2a19..c279ed3a0 100644 --- a/mcMMO/com/gmail/nossr50/mcm.java +++ b/mcMMO/com/gmail/nossr50/mcm.java @@ -13,6 +13,7 @@ import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.player.PlayerChatEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.Plugin; + public class mcm { /* * I'm storing my functions/methods in here in an unorganized manner. Spheal with it. @@ -159,7 +160,7 @@ public class mcm { } public boolean shouldBeWatched(Block block){ int id = block.getTypeId(); - if(id == 42 || id == 87 || id == 89 || id == 2 || id == 3 || id == 12 || id == 13 || id == 21 || id == 15 || id == 14 || id == 56 || id == 38 || id == 37 || id == 39 || id == 40 || id == 24){ + if(id == 17 || id == 42 || id == 87 || id == 89 || id == 2 || id == 3 || id == 12 || id == 13 || id == 21 || id == 15 || id == 14 || id == 56 || id == 38 || id == 37 || id == 39 || id == 40 || id == 24){ return true; } else { return false; diff --git a/mcMMO/plugin.yml b/mcMMO/plugin.yml index c54cfe613..7039a5a3e 100644 --- a/mcMMO/plugin.yml +++ b/mcMMO/plugin.yml @@ -1,3 +1,3 @@ name: mcMMO main: com.gmail.nossr50.mcMMO -version: 0.9.15 \ No newline at end of file +version: 0.9.16 \ No newline at end of file