version 1.1.09

This commit is contained in:
nossr50 2011-08-20 22:58:25 -07:00
parent 78f79213cd
commit 7190bb2472
8 changed files with 45 additions and 32 deletions

View File

@ -1,5 +1,14 @@
Changelog:
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code
Version 1.1.09
Fixed mcMMO to run fine without Spout :)
Version 1.1.08
Fixed repair being 10x slower to level than normal
Version 1.1.07
Fixed the default HUD being set to RETRO instead of STANDARD
Version 1.1.06
mcMMO menu implemented! Default is 'M', change this in config
Retro HUD implemented!

View File

@ -2,7 +2,6 @@ package com.gmail.nossr50.config;
import java.io.File;
import org.bukkit.util.config.Configuration;
import org.getspout.spoutapi.keyboard.Keyboard;
public class LoadProperties
{
@ -34,10 +33,8 @@ public class LoadProperties
public String directory = "plugins/mcMMO/";
public static Keyboard keypress;
File file = new File(directory + File.separator + "config.yml");
Configuration config = null;
static Configuration config = null;
public void configCheck()
{
@ -87,13 +84,14 @@ public class LoadProperties
return result;
}
private String readString(String root, String def)
public static String readString(String root, String def)
{
//Configuration config = load();
String result = config.getString(root, def);
config.save();
return result;
}
private Configuration load()
{
try {
@ -329,21 +327,6 @@ public class LoadProperties
{
System.out.println("Loading Config File...");
String temp = readString("Spout.Menu.Key", "KEY_M");
for(Keyboard x : Keyboard.values())
{
if(x.toString().equalsIgnoreCase(temp))
{
keypress = x;
}
}
if(keypress == null)
{
System.out.println("Invalid KEY for Spout.Menu.Key, using KEY_M");
keypress = Keyboard.KEY_M;
}
donateMessage = readBoolean("Commands.mcmmo.Donate_Message", true);
xpGainsMobSpawners = readBoolean("XP.Gains.Mobspawners.Enabled", false);

View File

@ -24,7 +24,7 @@ public class PlayerProfile
protected final Logger log = Logger.getLogger("Minecraft");
//HUD
private HUDType hud = HUDType.RETRO;
private HUDType hud = HUDType.STANDARD;
//MISC
private String party, myspawn, myspawnworld, invite;

View File

@ -7,7 +7,6 @@ import org.getspout.spoutapi.player.SpoutPlayer;
import com.gmail.nossr50.Users;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.config.LoadProperties;
import com.gmail.nossr50.datatypes.popups.PopupMMO;
import com.gmail.nossr50.spout.SpoutStuff;
@ -29,7 +28,7 @@ public class mcSpoutInputListener extends InputListener
SpoutPlayer sPlayer = event.getPlayer();
if(event.getKey() == LoadProperties.keypress)
if(event.getKey() == SpoutStuff.keypress)
{
if(!SpoutStuff.playerScreens.containsKey(sPlayer))
{

View File

@ -137,6 +137,7 @@ public class mcMMO extends JavaPlugin
//Spout Stuff
if(LoadProperties.spoutEnabled)
{
SpoutStuff.setupSpoutConfigs();
SpoutStuff.registerCustomEvent();
}

View File

@ -53,7 +53,7 @@ public class Repair {
durabilityAfter = player.getItemInHand().getDurability();
dif = (short) (durabilityBefore - durabilityAfter);
dif = (short) (dif * 6); //Boost XP
PP.addXP(SkillType.REPAIR, dif);
PP.addXP(SkillType.REPAIR, dif*10);
//CLANG CLANG
if(LoadProperties.spoutEnabled)
@ -68,7 +68,7 @@ public class Repair {
durabilityAfter = player.getItemInHand().getDurability();
dif = (short) (durabilityBefore - durabilityAfter);
dif = (short) (dif * 2); //Boost XP
PP.addXP(SkillType.REPAIR, dif);
PP.addXP(SkillType.REPAIR, dif*10);
//CLANG CLANG
if(LoadProperties.spoutEnabled)
@ -80,7 +80,7 @@ public class Repair {
durabilityAfter = player.getItemInHand().getDurability();
dif = (short) (durabilityBefore - durabilityAfter);
dif = (short) (dif * 4); //Boost XP of Gold to around Iron
PP.addXP(SkillType.REPAIR, dif);
PP.addXP(SkillType.REPAIR, dif*10);
//CLANG CLANG
if(LoadProperties.spoutEnabled)
@ -110,7 +110,7 @@ public class Repair {
//STONE NERF
dif = (short) (dif / 2);
PP.addXP(SkillType.REPAIR, dif);
PP.addXP(SkillType.REPAIR, dif*10);
} else if(isWoodTools(is) && hasItem(player,rWood)){
removeItem(player,rWood);
/*
@ -128,7 +128,7 @@ public class Repair {
//WOOD NERF
dif = (short) (dif / 2);
PP.addXP(SkillType.REPAIR, dif);
PP.addXP(SkillType.REPAIR, dif*10);
} else if(isIronTools(is) && hasItem(player, rIron)){
removeItem(player, rIron);
/*
@ -143,7 +143,7 @@ public class Repair {
dif = (short) (dif / 2);
if(m.isHoe(is))
dif = (short) (dif / 2);
PP.addXP(SkillType.REPAIR, dif);
PP.addXP(SkillType.REPAIR, dif*10);
//CLANG CLANG
if(LoadProperties.spoutEnabled)
@ -162,7 +162,7 @@ public class Repair {
dif = (short) (dif / 2);
if(m.isHoe(is))
dif = (short) (dif / 2);
PP.addXP(SkillType.REPAIR, dif);
PP.addXP(SkillType.REPAIR, dif*10);
//CLANG CLANG
if(LoadProperties.spoutEnabled)
@ -179,7 +179,7 @@ public class Repair {
dif = (short) (dif / 2);
if(m.isHoe(is))
dif = (short) (dif / 2);
PP.addXP(SkillType.REPAIR, dif);
PP.addXP(SkillType.REPAIR, dif*10);
//CLANG CLANG
if(LoadProperties.spoutEnabled)

View File

@ -13,6 +13,7 @@ import org.bukkit.event.Event.Priority;
import org.getspout.spoutapi.SpoutManager;
import org.getspout.spoutapi.gui.Color;
import org.getspout.spoutapi.gui.Widget;
import org.getspout.spoutapi.keyboard.Keyboard;
import org.getspout.spoutapi.player.SpoutPlayer;
import org.getspout.spoutapi.sound.SoundEffect;
import org.getspout.spoutapi.sound.SoundManager;
@ -44,6 +45,26 @@ public class SpoutStuff
public static HashMap<Player, ArrayList<HealthBarMMO>> partyHealthBars = new HashMap<Player, ArrayList<HealthBarMMO>>();
public static HashMap<SpoutPlayer, PopupMMO> playerScreens = new HashMap<SpoutPlayer, PopupMMO>();
public static Keyboard keypress;
public static void setupSpoutConfigs()
{
String temp = LoadProperties.readString("Spout.Menu.Key", "KEY_M");
for(Keyboard x : Keyboard.values())
{
if(x.toString().equalsIgnoreCase(temp))
{
keypress = x;
}
}
if(keypress == null)
{
System.out.println("Invalid KEY for Spout.Menu.Key, using KEY_M");
keypress = Keyboard.KEY_M;
}
}
public static void registerCustomEvent()
{
Bukkit.getServer().getPluginManager().registerEvent(Event.Type.CUSTOM_EVENT, spoutListener, Priority.Normal, plugin);

View File

@ -1,6 +1,6 @@
name: mcMMO
main: com.gmail.nossr50.mcMMO
version: 1.1.06
version: 1.1.09
softdepend: [Spout]
commands:
mchud: