mirror of
https://github.com/ME1312/SubServers-2.git
synced 2025-02-18 04:31:39 +01:00
Allow old Material names using bukkit:name
Spigot 1.13 has a compatabilty layer for old bukkit names, this will allow you to take advantage of that. 1.12: `bukkit:grass` -> `minecraft:grass` 1.13: `bukkit:grass` -> `minecraft:grass_block` 1.13: `grass` -> `minecraft:grass`
This commit is contained in:
parent
8f6d3e5527
commit
0ade35f544
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2,4 +2,4 @@ Manifest-Version: 1.0
|
|||||||
Class-Path: BungeeCord.jar Waterfall.jar
|
Class-Path: BungeeCord.jar Waterfall.jar
|
||||||
Main-Class: net.ME1312.SubServers.Bungee.Launch
|
Main-Class: net.ME1312.SubServers.Bungee.Launch
|
||||||
Implementation-Title: SubServers.Bungee
|
Implementation-Title: SubServers.Bungee
|
||||||
Specification-Title: 18w29m
|
Specification-Title: 18w29s
|
||||||
|
Binary file not shown.
@ -58,8 +58,8 @@ public final class SubPlugin extends BungeeCord implements Listener {
|
|||||||
public final SubAPI api = new SubAPI(this);
|
public final SubAPI api = new SubAPI(this);
|
||||||
public SubDataServer subdata = null;
|
public SubDataServer subdata = null;
|
||||||
public SubServer sudo = null;
|
public SubServer sudo = null;
|
||||||
public static final Version version = Version.fromString("2.13a/pr4");
|
//public static final Version version = Version.fromString("2.13a/pr4");
|
||||||
//public static final Version version = new Version(Version.fromString("2.13a/pr5"), VersionType.SNAPSHOT, (SubPlugin.class.getPackage().getSpecificationTitle() == null)?"?":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
|
public static final Version version = new Version(Version.fromString("2.13a/pr5"), VersionType.SNAPSHOT, (SubPlugin.class.getPackage().getSpecificationTitle() == null)?"?":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
|
||||||
|
|
||||||
public boolean redis = false;
|
public boolean redis = false;
|
||||||
public boolean canSudo = true;
|
public boolean canSudo = true;
|
||||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
|||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Implementation-Title: SubServers.Client.Bukkit
|
Implementation-Title: SubServers.Client.Bukkit
|
||||||
Specification-Title: 18w29m
|
Specification-Title: 18w29s
|
||||||
|
@ -224,11 +224,28 @@ public abstract class UIRenderer {
|
|||||||
// minecraft:name
|
// minecraft:name
|
||||||
if (item.get().toLowerCase().startsWith("minecraft:")) {
|
if (item.get().toLowerCase().startsWith("minecraft:")) {
|
||||||
item.set(item.get().substring(10));
|
item.set(item.get().substring(10));
|
||||||
}
|
} else
|
||||||
// bukkit name
|
|
||||||
|
// bukkit:name
|
||||||
|
if (item.get().toLowerCase().startsWith("bukkit:")) {
|
||||||
|
item.set(item.get().substring(7));
|
||||||
|
|
||||||
if (!Util.isException(() -> Material.valueOf(item.get().toUpperCase()))) {
|
if (!Util.isException(() -> Material.valueOf(item.get().toUpperCase()))) {
|
||||||
return new ItemStack(Material.valueOf(item.get().toUpperCase()), 1);
|
return new ItemStack(Material.valueOf(item.get().toUpperCase()), 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// material name
|
||||||
|
if (plugin.api.getGameVersion().compareTo(new Version("1.13")) < 0) {
|
||||||
|
if (!Util.isException(() -> Material.valueOf(item.get().toUpperCase()))) {
|
||||||
|
return new ItemStack(Material.valueOf(item.get().toUpperCase()), 1);
|
||||||
|
}
|
||||||
|
} else try {
|
||||||
|
if (Material.class.getMethod("getMaterial", String.class, boolean.class).invoke(null, item.get().toUpperCase(), false) != null) {
|
||||||
|
return new ItemStack((Material) Material.class.getMethod("getMaterial", String.class, boolean.class).invoke(null, item.get().toUpperCase(), false), 1);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {}
|
||||||
|
|
||||||
// vault name
|
// vault name
|
||||||
if (!Util.isException(() -> Class.forName("net.milkbowl.vault.item.Items"))) {
|
if (!Util.isException(() -> Class.forName("net.milkbowl.vault.item.Items"))) {
|
||||||
net.milkbowl.vault.item.ItemInfo info = net.milkbowl.vault.item.Items.itemByString(item.get());
|
net.milkbowl.vault.item.ItemInfo info = net.milkbowl.vault.item.Items.itemByString(item.get());
|
||||||
|
@ -46,8 +46,8 @@ public final class SubPlugin extends JavaPlugin {
|
|||||||
|
|
||||||
public SubPlugin() {
|
public SubPlugin() {
|
||||||
super();
|
super();
|
||||||
version = Version.fromString(getDescription().getVersion());
|
//version = Version.fromString(getDescription().getVersion());
|
||||||
//version = new Version(Version.fromString(getDescription().getVersion()), VersionType.SNAPSHOT, (SubPlugin.class.getPackage().getSpecificationTitle() == null)?"?":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
|
version = new Version(Version.fromString(getDescription().getVersion()), VersionType.SNAPSHOT, (SubPlugin.class.getPackage().getSpecificationTitle() == null)?"?":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: 'SubServers-Client-Bukkit'
|
name: 'SubServers-Client-Bukkit'
|
||||||
main: 'net.ME1312.SubServers.Client.Bukkit.SubPlugin'
|
main: 'net.ME1312.SubServers.Client.Bukkit.SubPlugin'
|
||||||
version: '2.13a/pr4'
|
version: '2.13a/pr5'
|
||||||
authors: [ME1312]
|
authors: [ME1312]
|
||||||
softdepend: [Vault, TitleManager]
|
softdepend: [Vault, TitleManager]
|
||||||
website: 'http://www.ME1312.net/'
|
website: 'http://www.ME1312.net/'
|
||||||
|
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Main-Class: net.ME1312.SubServers.Host.ExHost
|
Main-Class: net.ME1312.SubServers.Host.ExHost
|
||||||
Implementation-Title: SubServers.Host
|
Implementation-Title: SubServers.Host
|
||||||
Specification-Title: 18w29m
|
Specification-Title: 18w29s
|
||||||
|
@ -54,8 +54,8 @@ public final class ExHost {
|
|||||||
public SubDataClient subdata = null;
|
public SubDataClient subdata = null;
|
||||||
|
|
||||||
public final SubAPI api = new SubAPI(this);
|
public final SubAPI api = new SubAPI(this);
|
||||||
public static final Version version = Version.fromString("2.13a/pr4");
|
//public static final Version version = Version.fromString("2.13a/pr4");
|
||||||
//public static final Version version = new Version(Version.fromString("2.13a/pr5"), VersionType.SNAPSHOT, (ExHost.class.getPackage().getSpecificationTitle() == null)?"?":ExHost.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
|
public static final Version version = new Version(Version.fromString("2.13a/pr5"), VersionType.SNAPSHOT, (ExHost.class.getPackage().getSpecificationTitle() == null)?"?":ExHost.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
|
||||||
|
|
||||||
private ConsoleReader jline;
|
private ConsoleReader jline;
|
||||||
private boolean running = false;
|
private boolean running = false;
|
||||||
|
Binary file not shown.
@ -2,4 +2,4 @@ Manifest-Version: 1.0
|
|||||||
Class-Path: BungeeCord.jar Waterfall.jar
|
Class-Path: BungeeCord.jar Waterfall.jar
|
||||||
Main-Class: net.ME1312.SubServers.Sync.Launch
|
Main-Class: net.ME1312.SubServers.Sync.Launch
|
||||||
Implementation-Title: SubServers.Sync
|
Implementation-Title: SubServers.Sync
|
||||||
Specification-Title: 18w29m
|
Specification-Title: 18w29s
|
||||||
|
@ -48,8 +48,8 @@ public final class SubPlugin extends BungeeCord implements Listener {
|
|||||||
public boolean redis = false;
|
public boolean redis = false;
|
||||||
public final SubAPI api = new SubAPI(this);
|
public final SubAPI api = new SubAPI(this);
|
||||||
public SubDataClient subdata = null;
|
public SubDataClient subdata = null;
|
||||||
public static final Version version = Version.fromString("2.13a/pr4");
|
//public static final Version version = Version.fromString("2.13a/pr4");
|
||||||
//public static final Version version = new Version(Version.fromString("2.13a/pr5"), VersionType.SNAPSHOT, (SubPlugin.class.getPackage().getSpecificationTitle() == null)?"?":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
|
public static final Version version = new Version(Version.fromString("2.13a/pr5"), VersionType.SNAPSHOT, (SubPlugin.class.getPackage().getSpecificationTitle() == null)?"?":SubPlugin.class.getPackage().getSpecificationTitle()); // TODO Snapshot Version
|
||||||
|
|
||||||
public final boolean isPatched;
|
public final boolean isPatched;
|
||||||
public long lastReload = -1;
|
public long lastReload = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user