v1.0.1: blind fixed known issues
- error on swapping to creative with correct config - "/region info" not working on new worldguard-versions - unload error when worldguard not enabled
This commit is contained in:
parent
296278d3ed
commit
0f738ac018
5 changed files with 16 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
||||||
/.classpath
|
/.classpath
|
||||||
/bin
|
/bin
|
||||||
/.settings
|
/.settings
|
||||||
|
/target
|
|
@ -1,6 +1,6 @@
|
||||||
name: LimitedCreative
|
name: LimitedCreative
|
||||||
main: de.jaschastarke.minecraft.limitedcreative.Core
|
main: de.jaschastarke.minecraft.limitedcreative.Core
|
||||||
version: 1.0
|
version: 1.0.1
|
||||||
softdepend: [WorldGuard, WorldEdit, MultiInv]
|
softdepend: [WorldGuard, WorldEdit, MultiInv]
|
||||||
dev-url: http://dev.bukkit.org/server-mods/limited-creative/
|
dev-url: http://dev.bukkit.org/server-mods/limited-creative/
|
||||||
commands:
|
commands:
|
||||||
|
|
|
@ -272,9 +272,11 @@ public class Configuration {
|
||||||
if (sect.getBoolean("enabled")) {
|
if (sect.getBoolean("enabled")) {
|
||||||
Map<String, MaterialData> armor = new HashMap<String, MaterialData>();
|
Map<String, MaterialData> armor = new HashMap<String, MaterialData>();
|
||||||
for (Map.Entry<String, Object> entry : sect.getValues(false).entrySet()) {
|
for (Map.Entry<String, Object> entry : sect.getValues(false).entrySet()) {
|
||||||
MaterialData md = parseMaterial((String) entry.getValue());
|
if (!entry.getKey().equals("enabled")) {
|
||||||
if (md != null)
|
MaterialData md = parseMaterial((String) entry.getValue());
|
||||||
armor.put(entry.getKey(), md);
|
if (md != null)
|
||||||
|
armor.put(entry.getKey(), md);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return armor;
|
return armor;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,8 +44,9 @@ public class Core extends JavaPlugin {
|
||||||
@Override
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
plugin.getServer().getScheduler().cancelTasks(this);
|
plugin.getServer().getScheduler().cancelTasks(this);
|
||||||
try {
|
if (worldguard != null)
|
||||||
worldguard.unload();
|
worldguard.unload();
|
||||||
|
try {
|
||||||
Locale.unload();
|
Locale.unload();
|
||||||
} catch (NoClassDefFoundError e) {} // prevent unload issue
|
} catch (NoClassDefFoundError e) {} // prevent unload issue
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ package de.jaschastarke.minecraft.worldguard;
|
||||||
|
|
||||||
import static de.jaschastarke.minecraft.utils.Locale.L;
|
import static de.jaschastarke.minecraft.utils.Locale.L;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -136,8 +137,11 @@ public class CCommand implements CommandExecutor {
|
||||||
hasPermission(sender, Perms.INFO);
|
hasPermission(sender, Perms.INFO);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
String[] args = new String[]{"info", region.getWorld().getName(), region.getProtectedRegion().getId()};
|
/*
|
||||||
wg.onCommand(sender, wg.getCommand("region"), "region", args);
|
* WorldEdits intercepting Servers privates commandMap via Reflections realy sucks!
|
||||||
|
* Just because they are to lazy to add all the lines commands to plugin.yml
|
||||||
|
*/
|
||||||
|
Bukkit.getServer().dispatchCommand(sender, "region info "+region.getWorld().getName()+ " "+region.getProtectedRegion().getId());
|
||||||
|
|
||||||
StringBuilder list = new StringBuilder();
|
StringBuilder list = new StringBuilder();
|
||||||
for (FlagValue data : region.getFlags()) {
|
for (FlagValue data : region.getFlags()) {
|
||||||
|
|
Loading…
Reference in a new issue