mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Fixed NPE, Config.defaulthud was used instead of SpoutConfig.defaulthud
This commit is contained in:
parent
2a977557c2
commit
257df25a67
@ -6,7 +6,6 @@ import java.util.Set;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.HUDType;
|
||||
|
||||
public class Config extends ConfigLoader {
|
||||
public int xpGainMultiplier = 1;
|
||||
@ -376,8 +375,6 @@ public class Config extends ConfigLoader {
|
||||
* CONFIG LOADING
|
||||
*/
|
||||
|
||||
public HUDType defaulthud;
|
||||
|
||||
private Config(mcMMO plugin) {
|
||||
super(plugin, "config.yml");
|
||||
saveIfNotExist();
|
||||
|
@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.SpoutConfig;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomTool;
|
||||
import com.gmail.nossr50.events.experience.McMMOPlayerXpGainEvent;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
@ -63,7 +64,7 @@ public class PlayerProfile {
|
||||
private final String location = mcMMO.p.usersFile;
|
||||
|
||||
public PlayerProfile(String name, boolean addNew) {
|
||||
hud = Config.getInstance().defaulthud;
|
||||
hud = SpoutConfig.getInstance().defaulthud;
|
||||
playerName = name;
|
||||
|
||||
for (AbilityType abilityType : AbilityType.values()) {
|
||||
@ -120,7 +121,7 @@ public class PlayerProfile {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
hud = Config.getInstance().defaulthud;
|
||||
hud = SpoutConfig.getInstance().defaulthud;
|
||||
}
|
||||
}
|
||||
HashMap<Integer, ArrayList<String>> users = mcMMO.database.read("SELECT lastlogin, party FROM "+Config.getInstance().getMySQLTablePrefix()+"users WHERE id = " + id);
|
||||
@ -474,7 +475,7 @@ public class PlayerProfile {
|
||||
out.append(0+":"); //DATS
|
||||
out.append(0+":"); //DATS
|
||||
out.append(0+":"); //DATS
|
||||
out.append(Config.getInstance().defaulthud.toString()+":");//HUD
|
||||
out.append(SpoutConfig.getInstance().defaulthud.toString()+":");//HUD
|
||||
out.append(0+":"); //Fishing
|
||||
out.append(0+":"); //FishingXP
|
||||
out.append(0+":"); //Blast Mining
|
||||
|
Loading…
Reference in New Issue
Block a user