mirror of
https://e.coding.net/circlecloud/Residence.git
synced 2025-11-24 21:46:16 +00:00
@@ -247,14 +247,17 @@ public class ConfigManager {
|
||||
customRightClick = config.getIntegerList("Global.CustomRightClick");
|
||||
final ConfigurationSection node = config.getConfigurationSection("Global.GroupDefault");
|
||||
|
||||
if (!plugin.is1_8())
|
||||
if (!plugin.is1_8()) {
|
||||
actionBar = false;
|
||||
}
|
||||
|
||||
if (node != null) {
|
||||
final Set<String> keys = node.getConfigurationSection(defaultGroup).getKeys(false);
|
||||
if (keys != null)
|
||||
for (final String key : keys)
|
||||
if (keys != null) {
|
||||
for (final String key : keys) {
|
||||
globalGroupDefaults.put(key, FlagPermissions.parseFromConfigNode(key, config.getConfigurationSection("Global.GroupDefault")));
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
chatColor = ChatColor.valueOf(config.getString("Global.ResidenceChatColor", "DARK_PURPLE"));
|
||||
|
||||
@@ -83,8 +83,7 @@ public class Residence extends JavaPlugin {
|
||||
public static float bukkitver;
|
||||
|
||||
public final static int saveVersion = 1;
|
||||
public final static String[] validLanguages = { "English",
|
||||
"Chinese" };
|
||||
public final static String[] validLanguages = { "English", "Chinese" };
|
||||
protected static Residence instance;
|
||||
protected ResidenceBlockListener blistener;
|
||||
protected ChatManager chatmanager;
|
||||
@@ -341,6 +340,7 @@ public class Residence extends JavaPlugin {
|
||||
@Override
|
||||
public void onEnable() {
|
||||
try {
|
||||
instance = this;
|
||||
bukkitver = Float.parseFloat(this.getServer().getBukkitVersion().substring(0, 3));
|
||||
init = false;
|
||||
deleteConfirm = new HashMap<String, String>();
|
||||
|
||||
@@ -28,13 +28,13 @@ import com.bekvon.bukkit.residence.protection.ResidenceManager;
|
||||
*/
|
||||
public class TransactionManager {
|
||||
private Map<String, Integer> sellAmount;
|
||||
PermissionManager gm;
|
||||
PermissionManager gmanager;
|
||||
ResidenceManager manager;
|
||||
Residence plugin;
|
||||
|
||||
public TransactionManager(final Residence plugin, final ResidenceManager m, final PermissionManager g) {
|
||||
this.plugin = plugin;
|
||||
gm = g;
|
||||
gmanager = g;
|
||||
manager = m;
|
||||
sellAmount = Collections.synchronizedMap(new HashMap<String, Integer>());
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class TransactionManager {
|
||||
}
|
||||
|
||||
public void buyPlot(final String areaname, final Player player, final boolean resadmin) {
|
||||
final PermissionGroup group = gm.getGroup(player);
|
||||
final PermissionGroup group = gmanager.getGroup(player);
|
||||
if (!resadmin) {
|
||||
if (!plugin.getConfigManager().enableEconomy() || plugin.getEconomyManager() == null) {
|
||||
player.sendMessage(ChatColor.RED + plugin.getLanguage().getPhrase("MarketDisabled"));
|
||||
|
||||
@@ -235,16 +235,16 @@ public class PermissionGroup {
|
||||
if (limits == null) {
|
||||
return;
|
||||
}
|
||||
cancreate = limits.getBoolean("plugin.CanCreate", false);
|
||||
resmax = limits.getInt("plugin.MaxResidences", 0);
|
||||
maxPhysical = limits.getInt("plugin.MaxAreasPerResidence", 2);
|
||||
xmax = limits.getInt("plugin.MaxEastWest", 0);
|
||||
ymax = limits.getInt("plugin.MaxUpDown", 0);
|
||||
zmax = limits.getInt("plugin.MaxNorthSouth", 0);
|
||||
minHeight = limits.getInt("plugin.MinHeight", 0);
|
||||
maxHeight = limits.getInt("plugin.MaxHeight", 255);
|
||||
tpaccess = limits.getBoolean("plugin.CanTeleport", false);
|
||||
subzonedepth = limits.getInt("plugin.SubzoneDepth", 0);
|
||||
cancreate = limits.getBoolean("Residence.CanCreate", false);
|
||||
resmax = limits.getInt("Residence.MaxResidences", 0);
|
||||
maxPhysical = limits.getInt("Residence.MaxAreasPerResidence", 2);
|
||||
xmax = limits.getInt("Residence.MaxEastWest", 0);
|
||||
ymax = limits.getInt("Residence.MaxUpDown", 0);
|
||||
zmax = limits.getInt("Residence.MaxNorthSouth", 0);
|
||||
minHeight = limits.getInt("Residence.MinHeight", 0);
|
||||
maxHeight = limits.getInt("Residence.MaxHeight", 255);
|
||||
tpaccess = limits.getBoolean("Residence.CanTeleport", false);
|
||||
subzonedepth = limits.getInt("Residence.SubzoneDepth", 0);
|
||||
messageperms = limits.getBoolean("Messaging.CanChange", false);
|
||||
defaultEnterMessage = limits.getString("Messaging.DefaultEnter", null);
|
||||
defaultLeaveMessage = limits.getString("Messaging.DefaultLeave", null);
|
||||
@@ -257,10 +257,10 @@ public class PermissionGroup {
|
||||
canSell = limits.getBoolean("Economy.CanSell", false);
|
||||
buyIgnoreLimits = limits.getBoolean("Economy.IgnoreLimits", false);
|
||||
costperarea = limits.getDouble("Economy.BuyCost", 0);
|
||||
unstuck = limits.getBoolean("plugin.Unstuck", false);
|
||||
kick = limits.getBoolean("plugin.Kick", false);
|
||||
selectCommandAccess = limits.getBoolean("plugin.SelectCommandAccess", true);
|
||||
itemListAccess = limits.getBoolean("plugin.ItemListAccess", true);
|
||||
unstuck = limits.getBoolean("Residence.Unstuck", false);
|
||||
kick = limits.getBoolean("Residence.Kick", false);
|
||||
selectCommandAccess = limits.getBoolean("Residence.SelectCommandAccess", true);
|
||||
itemListAccess = limits.getBoolean("Residence.ItemListAccess", true);
|
||||
ConfigurationSection node = limits.getConfigurationSection("Flags.Permission");
|
||||
Set<String> flags = null;
|
||||
if (node != null) {
|
||||
|
||||
Reference in New Issue
Block a user