From 32135d56477393529920c2e5c22560a2c5706b42 Mon Sep 17 00:00:00 2001 From: GJ Date: Thu, 1 Mar 2012 12:24:30 -0500 Subject: [PATCH] Removed Milking/Shearing from Taming - too easy to abuse --- Changelog.txt | 2 - .../gmail/nossr50/config/LoadProperties.java | 4 +- .../nossr50/listeners/mcPlayerListener.java | 38 +++++-------------- src/main/resources/config.yml | 2 - 4 files changed, 10 insertions(+), 36 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 20a8c67c5..a16277466 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -54,9 +54,7 @@ Version 1.3.00-dev ! Changed mob spawn tracking to use Unique Entity ID instead of Entity Object ! Changed stats command name to mcstats for better plugin compatibility ! Changed god mode to turn off if player enters world where he does not have mcgod permission - ! Changed Taming to also gain XP from shearing ! Changed Taming to also gain XP from animal taming - ! Changed Taming to also gain XP from milking cows ! Changed Swords Bleeding effect to never kill ! Changed Bleeding to never go beyond 10 ticks ! Changed to use Bukkit's built-in ignoreCancelledEvents system diff --git a/src/main/java/com/gmail/nossr50/config/LoadProperties.java b/src/main/java/com/gmail/nossr50/config/LoadProperties.java index 379497097..93fa46562 100644 --- a/src/main/java/com/gmail/nossr50/config/LoadProperties.java +++ b/src/main/java/com/gmail/nossr50/config/LoadProperties.java @@ -42,7 +42,7 @@ public class LoadProperties { MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone, nIron, nGold, nDiamond, locale, nString, nLeather; - public static int treeFellerThreshold, mjungle, mtameWolf, mshearing, mmilkCow, mfishing, xpbar_x, xpbar_y, xpicon_x, xpicon_y, + public static int treeFellerThreshold, mjungle, mtameWolf, mfishing, xpbar_x, xpbar_y, xpicon_x, xpicon_y, chimaeraId, msandstone, mbase, moak, mbirch, mspruce, mmelon, mcactus, mmushroom, mflower, msugar, mpumpkin, mwheat, mgold, mdiamond, miron, mredstone, mlapis, mobsidian, mnetherrack, @@ -240,9 +240,7 @@ public class LoadProperties { mendstone = readInteger("Experience.Mining.End_Stone", 150); mmossstone = readInteger("Experience.Mining.Moss_Stone", 30); - mshearing = readInteger("Experience.Taming.Shearing", 250); mtameWolf = readInteger("Experience.Taming.Animal_Taming.Wolf", 250); - mmilkCow = readInteger("Experience.Taming.Milking", 50); mfishing = readInteger("Experience.Fishing.Base", 800); diff --git a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java index 6d15100b1..337419528 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java @@ -28,12 +28,12 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; +import org.bukkit.entity.TNTPrimed; import org.bukkit.entity.Wolf; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; -import org.bukkit.event.player.PlayerBucketFillEvent; import org.bukkit.event.player.PlayerChangedWorldEvent; import org.bukkit.event.player.PlayerChatEvent; import org.bukkit.event.player.PlayerCommandPreprocessEvent; @@ -44,7 +44,6 @@ import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerLoginEvent; import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.event.player.PlayerQuitEvent; -import org.bukkit.event.player.PlayerShearEntityEvent; import org.bukkit.inventory.ItemStack; import com.gmail.nossr50.Combat; @@ -92,18 +91,6 @@ public class mcPlayerListener implements Listener } } - @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) - public void onSheepUndressing(PlayerShearEntityEvent event) - { - Player player = event.getPlayer(); - if(mcPermissions.getInstance().taming(player)) - { - PlayerProfile PP = Users.getProfile(player); - PP.addXP(SkillType.TAMING, LoadProperties.mshearing, player); - Skills.XpCheckSkill(SkillType.TAMING, player); - } - } - @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerFish(PlayerFishEvent event) { @@ -198,6 +185,14 @@ public class mcPlayerListener implements Listener event.setCancelled(true); player.updateInventory(); } + + if(mat.equals(Material.TNT)) + { + TNTPrimed tnt = player.getWorld().spawn(block.getLocation(), TNTPrimed.class); + block.setType(Material.AIR); + tnt.setFuseTicks(0); +// plugin.misc.tntTracker.remove(block); + } if(LoadProperties.enableAbilities && m.abilityBlockCheck(block)) { @@ -325,21 +320,6 @@ public class mcPlayerListener implements Listener } } - @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) - public void onCowMilking(PlayerBucketFillEvent event){ - Player player = event.getPlayer(); - - if(mcPermissions.getInstance().taming(player)) - { - if(event.getItemStack().getTypeId() == 335) - { - PlayerProfile PP = Users.getProfile(player); - PP.addXP(SkillType.TAMING, LoadProperties.mmilkCow, player); - Skills.XpCheckSkill(SkillType.TAMING, player); - } - } - } - // Dynamically aliasing commands need to be re-done. // For now, using a command with an alias will send both the original command, and the mcMMO command @EventHandler(priority = EventPriority.LOWEST) diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 3ad1441fe..6bc91259d 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -229,10 +229,8 @@ Experience: End_Stone: 150 Moss_Stone: 30 Taming: - Shearing: 250 Animal_Taming: Wolf: 250 - Milking: 50 Combat: Multiplier: Animals: 1.0