mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 16:19:53 +01:00
Tweaking some merge mistakes / bugs
This commit is contained in:
parent
17c193f984
commit
7f233b8e77
@ -25,6 +25,7 @@ import com.gmail.nossr50.config.hocon.skills.acrobatics.ConfigAcrobatics;
|
||||
import com.gmail.nossr50.config.hocon.skills.alchemy.ConfigAlchemy;
|
||||
import com.gmail.nossr50.config.hocon.skills.archery.ConfigArchery;
|
||||
import com.gmail.nossr50.config.hocon.skills.axes.ConfigAxes;
|
||||
import com.gmail.nossr50.config.hocon.skills.exampleconfigs.ConfigNameRegisterDefaults;
|
||||
import com.gmail.nossr50.config.hocon.skills.exampleconfigs.MinecraftMaterialWrapper;
|
||||
import com.gmail.nossr50.config.hocon.skills.excavation.ConfigExcavation;
|
||||
import com.gmail.nossr50.config.hocon.skills.fishing.ConfigFishing;
|
||||
@ -129,6 +130,7 @@ public final class ConfigManager {
|
||||
private SerializedConfigLoader<ConfigWoodcutting> configWoodcutting;
|
||||
private SerializedConfigLoader<ConfigSmelting> configSmelting;
|
||||
private SerializedConfigLoader<ConfigSalvage> configSalvage;
|
||||
private SerializedConfigLoader<ConfigNameRegisterDefaults> configDefaultExamples;
|
||||
|
||||
private HashMap<PrimarySkillType, SerializedConfigLoader> skillConfigLoaders;
|
||||
|
||||
@ -225,6 +227,7 @@ public final class ConfigManager {
|
||||
configMobs = new SerializedConfigLoader<>(ConfigMobs.class, "creatures.conf", "Creatures", null);
|
||||
configExperience = new SerializedConfigLoader<>(ConfigExperience.class, "experience.conf", "Experience", null);
|
||||
|
||||
configDefaultExamples = new SerializedConfigLoader<>(ConfigNameRegisterDefaults.class, "minecraft_item_block_name_examples.conf", "Minecraft", null);
|
||||
initSerializedSkillConfigs();
|
||||
}
|
||||
|
||||
|
@ -9,10 +9,12 @@ import org.bukkit.Material;
|
||||
|
||||
public class MinecraftMaterialWrapperSerializer implements TypeSerializer<MinecraftMaterialWrapper> {
|
||||
|
||||
private static final String FULLY_QUALIFIED_NAME = "Fully-Qualified-Name";
|
||||
private static final String BUKKIT_MATERIAL_NAME = "Bukkit-Material-Name";
|
||||
|
||||
@Override
|
||||
public MinecraftMaterialWrapper deserialize(TypeToken<?> type, ConfigurationNode value) throws ObjectMappingException {
|
||||
Material material = Material.matchMaterial(value.getValue(new TypeToken<String>() {}));
|
||||
|
||||
Material material = Material.matchMaterial(value.getNode(FULLY_QUALIFIED_NAME).getValue(TypeToken.of(String.class)));
|
||||
return new MinecraftMaterialWrapper(material);
|
||||
}
|
||||
|
||||
@ -20,7 +22,7 @@ public class MinecraftMaterialWrapperSerializer implements TypeSerializer<Minecr
|
||||
public void serialize(TypeToken<?> type, MinecraftMaterialWrapper obj, ConfigurationNode value) {
|
||||
|
||||
value.setValue(obj.getName()); //Name
|
||||
value.getNode("Fully-Qualified-Name").setValue(obj.getFullyQualifiedName());
|
||||
value.getNode("Bukkit-Material-Name").setValue(obj.getBukkitMaterialName());
|
||||
value.getNode(FULLY_QUALIFIED_NAME).setValue(obj.getFullyQualifiedName());
|
||||
value.getNode(BUKKIT_MATERIAL_NAME).setValue(obj.getBukkitMaterialName());
|
||||
}
|
||||
}
|
@ -44,7 +44,8 @@ public class SalvageableSerializer implements TypeSerializer<Salvageable> {
|
||||
/* Repairable(Material itemMaterial, Material repairMaterial, int minimumQuantity, int minimumLevel, double xpMultiplier) */
|
||||
|
||||
String item = value.getNode(ITEM_NODE_NAME).getValue(TypeToken.of(String.class));
|
||||
String itemReturnedBySalvage = value.getNode(ITEM_RETURNED_BY_SALVAGE).getValue(new TypeToken<String>() {});
|
||||
// String itemReturnedBySalvage = value.getNode(ITEM_RETURNED_BY_SALVAGE).getValue(new TypeToken<String>() {});
|
||||
String itemReturnedBySalvage = value.getNode(ITEM_RETURNED_BY_SALVAGE).getValue(TypeToken.of(String.class));
|
||||
int maximumQuantityReturned = value.getNode(MAXIMUM_QUANTITY_RETURNED).getValue(TypeToken.of(Integer.class));
|
||||
int minimumLevel = value.getNode(OVERRIDE_LEVEL_REQUIREMENT).getValue(TypeToken.of(Integer.class));
|
||||
|
||||
|
@ -93,32 +93,4 @@ public class ConfigParty {
|
||||
|
||||
public boolean isPartySystemEnabled() { return partyGeneral.isEnablePartySystem(); }
|
||||
|
||||
/*
|
||||
|
||||
|
||||
public int getPTPCommandCooldown() {
|
||||
return getIntValue(COMMANDS, PTP, COOLDOWN);
|
||||
}
|
||||
|
||||
public int getPTPCommandWarmup() {
|
||||
return getIntValue(COMMANDS, PTP, WARMUP);
|
||||
}
|
||||
|
||||
public int getPTPCommandRecentlyHurtCooldown() {
|
||||
return getIntValue(COMMANDS, PTP, RECENTLY_HURT + COOLDOWN);
|
||||
}
|
||||
|
||||
public int getPTPCommandTimeout() {
|
||||
return getIntValue(COMMANDS, PTP, REQUEST_TIMEOUT);
|
||||
}
|
||||
|
||||
public boolean getPTPCommandConfirmRequired() {
|
||||
return getBooleanValue(COMMANDS, PTP, ACCEPT_REQUIRED);
|
||||
}
|
||||
|
||||
public boolean getPTPCommandWorldPermissions() {
|
||||
return getBooleanValue(COMMANDS, PTP, WORLD_BASED_PERMISSIONS);
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ public class Party {
|
||||
|
||||
List<Player> nearbyPlayerList = getNearMembers(UserManager.getPlayer(player));
|
||||
|
||||
boolean useDisplayNames = Config.getInstance().getPartyDisplayNames();
|
||||
boolean useDisplayNames = mcMMO.getConfigManager().getConfigParty().isPartyDisplayNamesEnabled();
|
||||
|
||||
if(isPartyLeaderOfflineOrHidden)
|
||||
{
|
||||
@ -511,7 +511,7 @@ public class Party {
|
||||
|
||||
if (party != null) {
|
||||
Player player = mcMMOPlayer.getPlayer();
|
||||
double range = Config.getInstance().getPartyShareRange();
|
||||
double range = mcMMO.getConfigManager().getConfigParty().getPartyXP().getPartyExperienceSharing().getPartyShareRange();
|
||||
|
||||
for (Player member : party.getOnlineMembers()) {
|
||||
if (!player.equals(member) && member.isValid() && Misc.isNear(player.getLocation(), member.getLocation(), range)) {
|
||||
|
Loading…
Reference in New Issue
Block a user