mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Remove unneeded changes and add back support for 1.9 through 1.12
This commit is contained in:
parent
d5b01aced2
commit
bbee2debff
@ -153,8 +153,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
};
|
||||
lookupNamesField.set(manager, pluginMap);
|
||||
}
|
||||
} catch (Throwable ignore) {
|
||||
}
|
||||
} catch (Throwable ignore) {}
|
||||
}
|
||||
|
||||
public static WorldEdit worldEdit;
|
||||
@ -178,7 +177,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
e.printStackTrace();
|
||||
PS.debug(StringMan.getString(Bukkit.getBukkitVersion()));
|
||||
PS.debug(StringMan.getString(Bukkit.getBukkitVersion().split("-")[0].split("\\.")));
|
||||
return new int[] { 1, 13, 0 };
|
||||
return new int[]{1, 10, 0};
|
||||
}
|
||||
}
|
||||
return this.version;
|
||||
@ -235,11 +234,11 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
if (manager instanceof SinglePlotAreaManager) {
|
||||
long start = System.currentTimeMillis();
|
||||
SinglePlotArea area = ((SinglePlotAreaManager) manager).getArea();
|
||||
outer: for (World world : Bukkit.getWorlds()) {
|
||||
outer:
|
||||
for (World world : Bukkit.getWorlds()) {
|
||||
String name = world.getName();
|
||||
char char0 = name.charAt(0);
|
||||
if (!Character.isDigit(char0) && char0 != '-')
|
||||
continue;
|
||||
if (!Character.isDigit(char0) && char0 != '-') continue;
|
||||
if (!world.getPlayers().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
@ -322,8 +321,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
return new int[]{Integer.parseInt(split[0]), Integer.parseInt(split[1]), Integer.parseInt(split[2])};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginVersionString() {
|
||||
@Override public String getPluginVersionString() {
|
||||
return getDescription().getVersion();
|
||||
}
|
||||
|
||||
@ -531,12 +529,10 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
LivingEntity livingEntity = (LivingEntity) entity;
|
||||
List<MetadataValue> meta = entity.getMetadata("plot");
|
||||
if (meta != null && !meta.isEmpty()) {
|
||||
if (livingEntity.isLeashed())
|
||||
continue;
|
||||
if (livingEntity.isLeashed()) continue;
|
||||
|
||||
List<MetadataValue> keep = entity.getMetadata("keep");
|
||||
if (keep != null && !keep.isEmpty())
|
||||
continue;
|
||||
if (keep != null && !keep.isEmpty()) continue;
|
||||
|
||||
PlotId originalPlotId = (PlotId) meta.get(0).value();
|
||||
if (originalPlotId != null) {
|
||||
@ -551,8 +547,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// This is to apply the metadata to already spawned shulkers (see
|
||||
// EntitySpawnListener.java)
|
||||
//This is to apply the metadata to already spawned shulkers (see EntitySpawnListener.java)
|
||||
com.intellectualcrafters.plot.object.Location pLoc = BukkitUtil.getLocation(entity.getLocation());
|
||||
PlotArea area = pLoc.getPlotArea();
|
||||
if (area != null) {
|
||||
@ -749,8 +744,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
try {
|
||||
OfflinePlayer.class.getDeclaredMethod("getUniqueId");
|
||||
checkVersion = true;
|
||||
} catch (Throwable ignore) {
|
||||
}
|
||||
} catch (Throwable ignore) {}
|
||||
UUIDWrapper wrapper;
|
||||
if (Settings.UUID.OFFLINE) {
|
||||
if (Settings.UUID.FORCE_LOWERCASE) {
|
||||
@ -780,7 +774,9 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
}
|
||||
}
|
||||
if (Settings.UUID.OFFLINE) {
|
||||
PS.log(C.PREFIX + " &6" + getPluginName() + " is using Offline Mode UUIDs either because of user preference, or because you are using an old version of " + "Bukkit");
|
||||
PS.log(C.PREFIX
|
||||
+ " &6" + getPluginName() + " is using Offline Mode UUIDs either because of user preference, or because you are using an old version of "
|
||||
+ "Bukkit");
|
||||
} else {
|
||||
PS.log(C.PREFIX + " &6" + getPluginName() + " is using online UUIDs");
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public class BukkitLocalQueue_1_9 extends BukkitLocalQueue<char[]> {
|
||||
ReflectionUtils.RefClass classWorld = getRefClass("{nms}.World");
|
||||
this.tileEntityListTick = classWorld.getField("tileEntityListTick");
|
||||
this.methodGetWorld = classChunk.getMethod("getWorld");
|
||||
this.methodW = classWorld.getMethod("r", classBlockPosition.getRealClass());
|
||||
this.methodW = classWorld.getMethod("w", classBlockPosition.getRealClass());
|
||||
this.fieldSections = classChunk.getField("sections");
|
||||
this.fieldWorld = classChunk.getField("world");
|
||||
ReflectionUtils.RefClass classBlock = getRefClass("{nms}.Block");
|
||||
|
Loading…
Reference in New Issue
Block a user