Small changes

This commit is contained in:
MattBDev
2019-06-26 20:14:00 -04:00
parent 1932c96d4f
commit d0a31691e1
61 changed files with 382 additions and 577 deletions

View File

@ -107,7 +107,7 @@ public class FaweBukkit implements IFawe, Listener {
throwable.printStackTrace();
}
} catch (final Throwable e) {
MainUtil.handleError(e);
e.printStackTrace();
Bukkit.getServer().shutdown();
}
@ -411,7 +411,7 @@ public class FaweBukkit implements IFawe, Listener {
managers.add(new WorldguardFlag(worldguardPlugin, this));
Fawe.debug("Plugin 'WorldGuard' found. Using it now.");
} catch (final Throwable e) {
MainUtil.handleError(e);
e.printStackTrace();
}
}
final Plugin townyPlugin = Bukkit.getServer().getPluginManager().getPlugin("Towny");
@ -420,7 +420,7 @@ public class FaweBukkit implements IFawe, Listener {
managers.add(new TownyFeature(townyPlugin, this));
Fawe.debug("Plugin 'Towny' found. Using it now.");
} catch (final Throwable e) {
MainUtil.handleError(e);
e.printStackTrace();
}
}
final Plugin factionsPlugin = Bukkit.getServer().getPluginManager().getPlugin("Factions");
@ -437,7 +437,7 @@ public class FaweBukkit implements IFawe, Listener {
managers.add(new FactionsOneFeature(factionsPlugin));
Fawe.debug("Plugin 'FactionsUUID' found. Using it now.");
} catch (Throwable e3) {
MainUtil.handleError(e);
e.printStackTrace();
}
}
@ -449,7 +449,7 @@ public class FaweBukkit implements IFawe, Listener {
managers.add(new ResidenceFeature(residencePlugin, this));
Fawe.debug("Plugin 'Residence' found. Using it now.");
} catch (final Throwable e) {
MainUtil.handleError(e);
e.printStackTrace();
}
}
final Plugin griefpreventionPlugin = Bukkit.getServer().getPluginManager().getPlugin("GriefPrevention");
@ -458,7 +458,7 @@ public class FaweBukkit implements IFawe, Listener {
managers.add(new GriefPreventionFeature(griefpreventionPlugin));
Fawe.debug("Plugin 'GriefPrevention' found. Using it now.");
} catch (final Throwable e) {
MainUtil.handleError(e);
e.printStackTrace();
}
}
final Plugin preciousstonesPlugin = Bukkit.getServer().getPluginManager().getPlugin("PreciousStones");
@ -467,7 +467,7 @@ public class FaweBukkit implements IFawe, Listener {
managers.add(new PreciousStonesFeature(preciousstonesPlugin, this));
Fawe.debug("Plugin 'PreciousStones' found. Using it now.");
} catch (final Throwable e) {
MainUtil.handleError(e);
e.printStackTrace();
}
}
@ -478,7 +478,7 @@ public class FaweBukkit implements IFawe, Listener {
managers.add(new ASkyBlockHook(aSkyBlock));
Fawe.debug("Plugin 'ASkyBlock' found. Using it now.");
} catch (final Throwable e) {
MainUtil.handleError(e);
e.printStackTrace();
}
}
if (Settings.IMP.EXPERIMENTAL.FREEBUILD) {
@ -486,7 +486,7 @@ public class FaweBukkit implements IFawe, Listener {
managers.add(new FreeBuildRegion());
Fawe.debug("Plugin '<internal.freebuild>' found. Using it now.");
} catch (final Throwable e) {
MainUtil.handleError(e);
e.printStackTrace();
}
}

View File

@ -3,7 +3,6 @@ package com.boydti.fawe.bukkit.regions;
import com.boydti.fawe.object.FawePlayer;
import com.boydti.fawe.object.RegionWrapper;
import com.boydti.fawe.regions.FaweMask;
import com.boydti.fawe.util.MainUtil;
import com.boydti.fawe.util.Perm;
import com.massivecraft.factions.FLocation;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
@ -107,7 +106,7 @@ public class FactionsOneFeature extends BukkitMaskManager implements Listener {
}
return true;
} catch (Throwable e) {
MainUtil.handleError(e);
e.printStackTrace();
return false;
}
}

View File

@ -1,6 +1,5 @@
package com.boydti.fawe.bukkit.util;
import com.boydti.fawe.util.MainUtil;
import com.boydti.fawe.util.ReflectionUtils;
import org.bukkit.Bukkit;
import org.bukkit.Server;
@ -38,7 +37,7 @@ public class BukkitReflectionUtils {
preClassM = "net.minecraft.server." + verM;
}
} catch (final Exception e) {
MainUtil.handleError(e);
e.printStackTrace();
}
}

View File

@ -334,7 +334,7 @@ public class BukkitChunk_All extends IntFaweChunk<Chunk, BukkitQueue_All> {
index = 0;
}
} catch (final Throwable e) {
MainUtil.handleError(e);
e.printStackTrace();
}
} while (System.currentTimeMillis() - start < recommended);
if (more || place) {

View File

@ -284,7 +284,7 @@ public class BukkitChunk_1_13 extends IntFaweChunk<Chunk, BukkitQueue_1_13> {
copy.sectionPalettes[i] = copy(current);
}
} catch (Throwable e) {
MainUtil.handleError(e);
e.printStackTrace();
}
}
return copy;
@ -620,7 +620,7 @@ public class BukkitChunk_1_13 extends IntFaweChunk<Chunk, BukkitQueue_1_13> {
getParent().getChangeTask().run(copy, this);
}
} catch (Throwable e) {
MainUtil.handleError(e);
e.printStackTrace();
}
return this;
}

View File

@ -13,7 +13,6 @@ import com.boydti.fawe.object.FawePlayer;
import com.boydti.fawe.object.RegionWrapper;
import com.boydti.fawe.object.brush.visualization.VisualChunk;
import com.boydti.fawe.object.visitor.FaweChunkVisitor;
import com.boydti.fawe.util.MainUtil;
import com.boydti.fawe.util.MathMan;
import com.boydti.fawe.util.TaskManager;
@ -701,7 +700,7 @@ public class BukkitQueue_1_13 extends BukkitQueue_0<net.minecraft.server.v1_13_R
tile.save(tag); // readTagIntoEntity
return (CompoundTag) toNative(tag);
} catch (Exception e) {
MainUtil.handleError(e);
e.printStackTrace();
return null;
}
}

View File

@ -26,6 +26,7 @@ import org.bukkit.OfflinePlayer;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
@ -58,7 +59,7 @@ public class ConfigurationPermissionsResolver implements PermissionsResolver {
Map<String, Set<String>> userGroupPermissions = new HashMap<>();
List<String> groupKeys = config.getStringList("permissions.groups", null);
List<String> groupKeys = config.getKeys("permissions.groups");
if (groupKeys != null) {
for (String key : groupKeys) {
@ -76,7 +77,7 @@ public class ConfigurationPermissionsResolver implements PermissionsResolver {
}
}
List<String> userKeys = config.getStringList("permissions.users", null);
List<String> userKeys = config.getKeys("permissions.users");
if (userKeys != null) {
for (String key : userKeys) {
@ -102,8 +103,8 @@ public class ConfigurationPermissionsResolver implements PermissionsResolver {
}
}
userPermissionsCache.put(key.toLowerCase(), permsCache);
userGroups.put(key.toLowerCase(), new HashSet<>(groups));
userPermissionsCache.put(key.toLowerCase(Locale.ROOT), permsCache);
userGroups.put(key.toLowerCase(Locale.ROOT), new HashSet<>(groups));
}
}
}
@ -117,7 +118,7 @@ public class ConfigurationPermissionsResolver implements PermissionsResolver {
}
}
Set<String> perms = userPermissionsCache.get(player.toLowerCase());
Set<String> perms = userPermissionsCache.get(player.toLowerCase(Locale.ROOT));
if (perms == null) {
return defaultPermissionsCache.contains(permission)
|| defaultPermissionsCache.contains("*");
@ -134,7 +135,7 @@ public class ConfigurationPermissionsResolver implements PermissionsResolver {
@Override
public boolean inGroup(String player, String group) {
Set<String> groups = userGroups.get(player.toLowerCase());
Set<String> groups = userGroups.get(player.toLowerCase(Locale.ROOT));
if (groups == null) {
return false;
}
@ -144,12 +145,12 @@ public class ConfigurationPermissionsResolver implements PermissionsResolver {
@Override
public String[] getGroups(String player) {
Set<String> groups = userGroups.get(player.toLowerCase());
Set<String> groups = userGroups.get(player.toLowerCase(Locale.ROOT));
if (groups == null) {
return new String[0];
}
return groups.toArray(new String[groups.size()]);
return groups.toArray(new String[0]);
}
@Override