From 244f356331a3298edcfc23be770a3a3bd0f6051c Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 21 Feb 2011 23:33:06 -0800 Subject: [PATCH] All changes up to 0.6.4 --- mcMMO/com/gmail/nossr50/mcBlockListener.java | 10 +++++----- mcMMO/com/gmail/nossr50/mcLoadProperties.java | 11 +++++++++-- mcMMO/com/gmail/nossr50/mcMMO.java | 2 ++ mcMMO/plugin.yml | 2 +- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/mcMMO/com/gmail/nossr50/mcBlockListener.java b/mcMMO/com/gmail/nossr50/mcBlockListener.java index 68cc28bb2..0c897c4ee 100644 --- a/mcMMO/com/gmail/nossr50/mcBlockListener.java +++ b/mcMMO/com/gmail/nossr50/mcBlockListener.java @@ -32,7 +32,7 @@ public class mcBlockListener extends BlockListener { String xyz = x+","+y+","+z; mcConfig.getInstance().addBlockWatch(block); mcConfig.getInstance().addCoordsWatch(xyz); - if(block.getTypeId() == 42) + if(block.getTypeId() == 42 && mcLoadProperties.anvilmessages) event.getPlayer().sendMessage(ChatColor.DARK_RED+"You have placed an anvil, anvils can repair tools and armor."); } //put all Block related code here @@ -102,12 +102,12 @@ public class mcBlockListener extends BlockListener { for (int cx = -radius; cx <= radius; cx++) { for (int cy = -radius; cy <= radius; cy++) { for (int cz = -radius; cz <= radius; cz++) { - Block dirt = world.getBlockAt(ox + cx, oy + cy, oz + cz); - //If block is dirt + Block block = world.getBlockAt(ox + cx, oy + cy, oz + cz); + //If block is block if (isWater == true && - dirt.getTypeId() == 13) { + block.getTypeId() == 13 && mcLoadProperties.clay) { //Change - dirt.setTypeId(82); + block.setTypeId(82); return; } } diff --git a/mcMMO/com/gmail/nossr50/mcLoadProperties.java b/mcMMO/com/gmail/nossr50/mcLoadProperties.java index d5dc5241b..6de28c540 100644 --- a/mcMMO/com/gmail/nossr50/mcLoadProperties.java +++ b/mcMMO/com/gmail/nossr50/mcLoadProperties.java @@ -1,7 +1,7 @@ package com.gmail.nossr50; public class mcLoadProperties { - public static Boolean pvp, eggs, apples, cake, music, diamond, glowstone, slowsand, sulphur, netherrack, bones, coal; + public static Boolean pvp, eggs, apples, cake, music, diamond, glowstone, slowsand, sulphur, netherrack, bones, coal, clay, anvilmessages; public static String mcmmo, mcc, stats, mmoedit, ptp, party, myspawn, setmyspawn, whois, invite, accept; public static void loadMain(){ @@ -9,7 +9,14 @@ public class mcLoadProperties { mcProperties properties = new mcProperties(propertiesFile); properties.load(); - + /* + * TOGGLE CLAY + */ + clay = properties.getBoolean("clay", true); + /* + * ANVIL MESSAGES + */ + anvilmessages = properties.getBoolean("anvilmessages", true); /* * EXCAVATION LOOT TOGGLES */ diff --git a/mcMMO/com/gmail/nossr50/mcMMO.java b/mcMMO/com/gmail/nossr50/mcMMO.java index a514d15fd..5d6342a67 100644 --- a/mcMMO/com/gmail/nossr50/mcMMO.java +++ b/mcMMO/com/gmail/nossr50/mcMMO.java @@ -67,6 +67,8 @@ public class mcMMO extends JavaPlugin { writer.append("mcmmo=mcmmo"); writer.append("mcc=mcc"); writer.append("stats=stats"); + writer.append("clay=true"); + writer.append("anvilmessages=true"); writer.append("#Appreciate the plugin? Send me a donation via paypal nossr50@gmail.com\r\n"); } catch (Exception e) { log.log(Level.SEVERE, "Exception while creating " + Properties, e); diff --git a/mcMMO/plugin.yml b/mcMMO/plugin.yml index ca0a557fe..db1e30820 100644 --- a/mcMMO/plugin.yml +++ b/mcMMO/plugin.yml @@ -1,3 +1,3 @@ name: mcMMO main: com.gmail.nossr50.mcMMO -version: 0.6.2 \ No newline at end of file +version: 0.6.4 \ No newline at end of file