mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
version 1.1.09
This commit is contained in:
parent
78f79213cd
commit
7190bb2472
@ -1,5 +1,14 @@
|
|||||||
Changelog:
|
Changelog:
|
||||||
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code
|
#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
|
Version 1.1.06
|
||||||
mcMMO menu implemented! Default is 'M', change this in config
|
mcMMO menu implemented! Default is 'M', change this in config
|
||||||
Retro HUD implemented!
|
Retro HUD implemented!
|
||||||
|
@ -2,7 +2,6 @@ package com.gmail.nossr50.config;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import org.bukkit.util.config.Configuration;
|
import org.bukkit.util.config.Configuration;
|
||||||
import org.getspout.spoutapi.keyboard.Keyboard;
|
|
||||||
|
|
||||||
public class LoadProperties
|
public class LoadProperties
|
||||||
{
|
{
|
||||||
@ -34,10 +33,8 @@ public class LoadProperties
|
|||||||
|
|
||||||
public String directory = "plugins/mcMMO/";
|
public String directory = "plugins/mcMMO/";
|
||||||
|
|
||||||
public static Keyboard keypress;
|
|
||||||
|
|
||||||
File file = new File(directory + File.separator + "config.yml");
|
File file = new File(directory + File.separator + "config.yml");
|
||||||
Configuration config = null;
|
static Configuration config = null;
|
||||||
|
|
||||||
public void configCheck()
|
public void configCheck()
|
||||||
{
|
{
|
||||||
@ -87,13 +84,14 @@ public class LoadProperties
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String readString(String root, String def)
|
public static String readString(String root, String def)
|
||||||
{
|
{
|
||||||
//Configuration config = load();
|
//Configuration config = load();
|
||||||
String result = config.getString(root, def);
|
String result = config.getString(root, def);
|
||||||
config.save();
|
config.save();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Configuration load()
|
private Configuration load()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@ -329,21 +327,6 @@ public class LoadProperties
|
|||||||
{
|
{
|
||||||
System.out.println("Loading Config File...");
|
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);
|
donateMessage = readBoolean("Commands.mcmmo.Donate_Message", true);
|
||||||
xpGainsMobSpawners = readBoolean("XP.Gains.Mobspawners.Enabled", false);
|
xpGainsMobSpawners = readBoolean("XP.Gains.Mobspawners.Enabled", false);
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ public class PlayerProfile
|
|||||||
protected final Logger log = Logger.getLogger("Minecraft");
|
protected final Logger log = Logger.getLogger("Minecraft");
|
||||||
|
|
||||||
//HUD
|
//HUD
|
||||||
private HUDType hud = HUDType.RETRO;
|
private HUDType hud = HUDType.STANDARD;
|
||||||
|
|
||||||
//MISC
|
//MISC
|
||||||
private String party, myspawn, myspawnworld, invite;
|
private String party, myspawn, myspawnworld, invite;
|
||||||
|
@ -7,7 +7,6 @@ import org.getspout.spoutapi.player.SpoutPlayer;
|
|||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
import com.gmail.nossr50.Users;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.popups.PopupMMO;
|
import com.gmail.nossr50.datatypes.popups.PopupMMO;
|
||||||
import com.gmail.nossr50.spout.SpoutStuff;
|
import com.gmail.nossr50.spout.SpoutStuff;
|
||||||
|
|
||||||
@ -29,7 +28,7 @@ public class mcSpoutInputListener extends InputListener
|
|||||||
|
|
||||||
SpoutPlayer sPlayer = event.getPlayer();
|
SpoutPlayer sPlayer = event.getPlayer();
|
||||||
|
|
||||||
if(event.getKey() == LoadProperties.keypress)
|
if(event.getKey() == SpoutStuff.keypress)
|
||||||
{
|
{
|
||||||
if(!SpoutStuff.playerScreens.containsKey(sPlayer))
|
if(!SpoutStuff.playerScreens.containsKey(sPlayer))
|
||||||
{
|
{
|
||||||
|
@ -137,6 +137,7 @@ public class mcMMO extends JavaPlugin
|
|||||||
//Spout Stuff
|
//Spout Stuff
|
||||||
if(LoadProperties.spoutEnabled)
|
if(LoadProperties.spoutEnabled)
|
||||||
{
|
{
|
||||||
|
SpoutStuff.setupSpoutConfigs();
|
||||||
SpoutStuff.registerCustomEvent();
|
SpoutStuff.registerCustomEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ public class Repair {
|
|||||||
durabilityAfter = player.getItemInHand().getDurability();
|
durabilityAfter = player.getItemInHand().getDurability();
|
||||||
dif = (short) (durabilityBefore - durabilityAfter);
|
dif = (short) (durabilityBefore - durabilityAfter);
|
||||||
dif = (short) (dif * 6); //Boost XP
|
dif = (short) (dif * 6); //Boost XP
|
||||||
PP.addXP(SkillType.REPAIR, dif);
|
PP.addXP(SkillType.REPAIR, dif*10);
|
||||||
|
|
||||||
//CLANG CLANG
|
//CLANG CLANG
|
||||||
if(LoadProperties.spoutEnabled)
|
if(LoadProperties.spoutEnabled)
|
||||||
@ -68,7 +68,7 @@ public class Repair {
|
|||||||
durabilityAfter = player.getItemInHand().getDurability();
|
durabilityAfter = player.getItemInHand().getDurability();
|
||||||
dif = (short) (durabilityBefore - durabilityAfter);
|
dif = (short) (durabilityBefore - durabilityAfter);
|
||||||
dif = (short) (dif * 2); //Boost XP
|
dif = (short) (dif * 2); //Boost XP
|
||||||
PP.addXP(SkillType.REPAIR, dif);
|
PP.addXP(SkillType.REPAIR, dif*10);
|
||||||
|
|
||||||
//CLANG CLANG
|
//CLANG CLANG
|
||||||
if(LoadProperties.spoutEnabled)
|
if(LoadProperties.spoutEnabled)
|
||||||
@ -80,7 +80,7 @@ public class Repair {
|
|||||||
durabilityAfter = player.getItemInHand().getDurability();
|
durabilityAfter = player.getItemInHand().getDurability();
|
||||||
dif = (short) (durabilityBefore - durabilityAfter);
|
dif = (short) (durabilityBefore - durabilityAfter);
|
||||||
dif = (short) (dif * 4); //Boost XP of Gold to around Iron
|
dif = (short) (dif * 4); //Boost XP of Gold to around Iron
|
||||||
PP.addXP(SkillType.REPAIR, dif);
|
PP.addXP(SkillType.REPAIR, dif*10);
|
||||||
|
|
||||||
//CLANG CLANG
|
//CLANG CLANG
|
||||||
if(LoadProperties.spoutEnabled)
|
if(LoadProperties.spoutEnabled)
|
||||||
@ -110,7 +110,7 @@ public class Repair {
|
|||||||
//STONE NERF
|
//STONE NERF
|
||||||
dif = (short) (dif / 2);
|
dif = (short) (dif / 2);
|
||||||
|
|
||||||
PP.addXP(SkillType.REPAIR, dif);
|
PP.addXP(SkillType.REPAIR, dif*10);
|
||||||
} else if(isWoodTools(is) && hasItem(player,rWood)){
|
} else if(isWoodTools(is) && hasItem(player,rWood)){
|
||||||
removeItem(player,rWood);
|
removeItem(player,rWood);
|
||||||
/*
|
/*
|
||||||
@ -128,7 +128,7 @@ public class Repair {
|
|||||||
//WOOD NERF
|
//WOOD NERF
|
||||||
dif = (short) (dif / 2);
|
dif = (short) (dif / 2);
|
||||||
|
|
||||||
PP.addXP(SkillType.REPAIR, dif);
|
PP.addXP(SkillType.REPAIR, dif*10);
|
||||||
} else if(isIronTools(is) && hasItem(player, rIron)){
|
} else if(isIronTools(is) && hasItem(player, rIron)){
|
||||||
removeItem(player, rIron);
|
removeItem(player, rIron);
|
||||||
/*
|
/*
|
||||||
@ -143,7 +143,7 @@ public class Repair {
|
|||||||
dif = (short) (dif / 2);
|
dif = (short) (dif / 2);
|
||||||
if(m.isHoe(is))
|
if(m.isHoe(is))
|
||||||
dif = (short) (dif / 2);
|
dif = (short) (dif / 2);
|
||||||
PP.addXP(SkillType.REPAIR, dif);
|
PP.addXP(SkillType.REPAIR, dif*10);
|
||||||
|
|
||||||
//CLANG CLANG
|
//CLANG CLANG
|
||||||
if(LoadProperties.spoutEnabled)
|
if(LoadProperties.spoutEnabled)
|
||||||
@ -162,7 +162,7 @@ public class Repair {
|
|||||||
dif = (short) (dif / 2);
|
dif = (short) (dif / 2);
|
||||||
if(m.isHoe(is))
|
if(m.isHoe(is))
|
||||||
dif = (short) (dif / 2);
|
dif = (short) (dif / 2);
|
||||||
PP.addXP(SkillType.REPAIR, dif);
|
PP.addXP(SkillType.REPAIR, dif*10);
|
||||||
|
|
||||||
//CLANG CLANG
|
//CLANG CLANG
|
||||||
if(LoadProperties.spoutEnabled)
|
if(LoadProperties.spoutEnabled)
|
||||||
@ -179,7 +179,7 @@ public class Repair {
|
|||||||
dif = (short) (dif / 2);
|
dif = (short) (dif / 2);
|
||||||
if(m.isHoe(is))
|
if(m.isHoe(is))
|
||||||
dif = (short) (dif / 2);
|
dif = (short) (dif / 2);
|
||||||
PP.addXP(SkillType.REPAIR, dif);
|
PP.addXP(SkillType.REPAIR, dif*10);
|
||||||
|
|
||||||
//CLANG CLANG
|
//CLANG CLANG
|
||||||
if(LoadProperties.spoutEnabled)
|
if(LoadProperties.spoutEnabled)
|
||||||
|
@ -13,6 +13,7 @@ import org.bukkit.event.Event.Priority;
|
|||||||
import org.getspout.spoutapi.SpoutManager;
|
import org.getspout.spoutapi.SpoutManager;
|
||||||
import org.getspout.spoutapi.gui.Color;
|
import org.getspout.spoutapi.gui.Color;
|
||||||
import org.getspout.spoutapi.gui.Widget;
|
import org.getspout.spoutapi.gui.Widget;
|
||||||
|
import org.getspout.spoutapi.keyboard.Keyboard;
|
||||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||||
import org.getspout.spoutapi.sound.SoundEffect;
|
import org.getspout.spoutapi.sound.SoundEffect;
|
||||||
import org.getspout.spoutapi.sound.SoundManager;
|
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<Player, ArrayList<HealthBarMMO>> partyHealthBars = new HashMap<Player, ArrayList<HealthBarMMO>>();
|
||||||
public static HashMap<SpoutPlayer, PopupMMO> playerScreens = new HashMap<SpoutPlayer, PopupMMO>();
|
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()
|
public static void registerCustomEvent()
|
||||||
{
|
{
|
||||||
Bukkit.getServer().getPluginManager().registerEvent(Event.Type.CUSTOM_EVENT, spoutListener, Priority.Normal, plugin);
|
Bukkit.getServer().getPluginManager().registerEvent(Event.Type.CUSTOM_EVENT, spoutListener, Priority.Normal, plugin);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: mcMMO
|
name: mcMMO
|
||||||
main: com.gmail.nossr50.mcMMO
|
main: com.gmail.nossr50.mcMMO
|
||||||
version: 1.1.06
|
version: 1.1.09
|
||||||
softdepend: [Spout]
|
softdepend: [Spout]
|
||||||
commands:
|
commands:
|
||||||
mchud:
|
mchud:
|
||||||
|
Loading…
Reference in New Issue
Block a user