All changes up to 0.6.4

This commit is contained in:
nossr50 2011-02-21 23:33:06 -08:00
parent 38f24bee62
commit 244f356331
4 changed files with 17 additions and 8 deletions

View File

@ -32,7 +32,7 @@ public class mcBlockListener extends BlockListener {
String xyz = x+","+y+","+z; String xyz = x+","+y+","+z;
mcConfig.getInstance().addBlockWatch(block); mcConfig.getInstance().addBlockWatch(block);
mcConfig.getInstance().addCoordsWatch(xyz); 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."); event.getPlayer().sendMessage(ChatColor.DARK_RED+"You have placed an anvil, anvils can repair tools and armor.");
} }
//put all Block related code here //put all Block related code here
@ -102,12 +102,12 @@ public class mcBlockListener extends BlockListener {
for (int cx = -radius; cx <= radius; cx++) { for (int cx = -radius; cx <= radius; cx++) {
for (int cy = -radius; cy <= radius; cy++) { for (int cy = -radius; cy <= radius; cy++) {
for (int cz = -radius; cz <= radius; cz++) { for (int cz = -radius; cz <= radius; cz++) {
Block dirt = world.getBlockAt(ox + cx, oy + cy, oz + cz); Block block = world.getBlockAt(ox + cx, oy + cy, oz + cz);
//If block is dirt //If block is block
if (isWater == true && if (isWater == true &&
dirt.getTypeId() == 13) { block.getTypeId() == 13 && mcLoadProperties.clay) {
//Change //Change
dirt.setTypeId(82); block.setTypeId(82);
return; return;
} }
} }

View File

@ -1,7 +1,7 @@
package com.gmail.nossr50; package com.gmail.nossr50;
public class mcLoadProperties { 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 String mcmmo, mcc, stats, mmoedit, ptp, party, myspawn, setmyspawn, whois, invite, accept;
public static void loadMain(){ public static void loadMain(){
@ -9,7 +9,14 @@ public class mcLoadProperties {
mcProperties properties = new mcProperties(propertiesFile); mcProperties properties = new mcProperties(propertiesFile);
properties.load(); properties.load();
/*
* TOGGLE CLAY
*/
clay = properties.getBoolean("clay", true);
/*
* ANVIL MESSAGES
*/
anvilmessages = properties.getBoolean("anvilmessages", true);
/* /*
* EXCAVATION LOOT TOGGLES * EXCAVATION LOOT TOGGLES
*/ */

View File

@ -67,6 +67,8 @@ public class mcMMO extends JavaPlugin {
writer.append("mcmmo=mcmmo"); writer.append("mcmmo=mcmmo");
writer.append("mcc=mcc"); writer.append("mcc=mcc");
writer.append("stats=stats"); 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"); writer.append("#Appreciate the plugin? Send me a donation via paypal nossr50@gmail.com\r\n");
} catch (Exception e) { } catch (Exception e) {
log.log(Level.SEVERE, "Exception while creating " + Properties, e); log.log(Level.SEVERE, "Exception while creating " + Properties, e);

View File

@ -1,3 +1,3 @@
name: mcMMO name: mcMMO
main: com.gmail.nossr50.mcMMO main: com.gmail.nossr50.mcMMO
version: 0.6.2 version: 0.6.4