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
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
/.project
|
||||
/.classpath
|
||||
/bin
|
||||
/.settings
|
||||
/.settings
|
||||
/target
|
|
@ -1,6 +1,6 @@
|
|||
name: LimitedCreative
|
||||
main: de.jaschastarke.minecraft.limitedcreative.Core
|
||||
version: 1.0
|
||||
version: 1.0.1
|
||||
softdepend: [WorldGuard, WorldEdit, MultiInv]
|
||||
dev-url: http://dev.bukkit.org/server-mods/limited-creative/
|
||||
commands:
|
||||
|
|
|
@ -272,9 +272,11 @@ public class Configuration {
|
|||
if (sect.getBoolean("enabled")) {
|
||||
Map<String, MaterialData> armor = new HashMap<String, MaterialData>();
|
||||
for (Map.Entry<String, Object> entry : sect.getValues(false).entrySet()) {
|
||||
MaterialData md = parseMaterial((String) entry.getValue());
|
||||
if (md != null)
|
||||
armor.put(entry.getKey(), md);
|
||||
if (!entry.getKey().equals("enabled")) {
|
||||
MaterialData md = parseMaterial((String) entry.getValue());
|
||||
if (md != null)
|
||||
armor.put(entry.getKey(), md);
|
||||
}
|
||||
}
|
||||
return armor;
|
||||
}
|
||||
|
|
|
@ -44,8 +44,9 @@ public class Core extends JavaPlugin {
|
|||
@Override
|
||||
public void onDisable() {
|
||||
plugin.getServer().getScheduler().cancelTasks(this);
|
||||
try {
|
||||
if (worldguard != null)
|
||||
worldguard.unload();
|
||||
try {
|
||||
Locale.unload();
|
||||
} catch (NoClassDefFoundError e) {} // prevent unload issue
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ package de.jaschastarke.minecraft.worldguard;
|
|||
|
||||
import static de.jaschastarke.minecraft.utils.Locale.L;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.Command;
|
||||
|
@ -136,8 +137,11 @@ public class CCommand implements CommandExecutor {
|
|||
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();
|
||||
for (FlagValue data : region.getFlags()) {
|
||||
|
|
Loading…
Reference in a new issue