geforkt von Mirrors/FastAsyncWorldEdit
Move some platform stuff to load, put enable back to postworld.
Dieser Commit ist enthalten in:
Ursprung
678a78a982
Commit
d1c2a029bf
@ -110,6 +110,8 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
|
||||
*/
|
||||
@Override
|
||||
public void onEnable() {
|
||||
setupTags(); // these have to be done post-world since they rely on MC registries. the other ones just use Bukkit enums
|
||||
|
||||
PermissionsResolverManager.initialize(this); // Setup permission resolver
|
||||
|
||||
// Register CUI
|
||||
@ -168,12 +170,15 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
|
||||
EntityType.REGISTRY.register("minecraft:" + mcid.toLowerCase(), new EntityType("minecraft:" + mcid.toLowerCase()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setupTags() {
|
||||
// Tags
|
||||
try {
|
||||
for (org.bukkit.Tag<Material> blockTag : Bukkit.getTags(Tag.REGISTRY_BLOCKS, Material.class)) {
|
||||
for (Tag<Material> blockTag : Bukkit.getTags(Tag.REGISTRY_BLOCKS, Material.class)) {
|
||||
BlockCategory.REGISTRY.register(blockTag.getKey().toString(), new BlockCategory(blockTag.getKey().toString()));
|
||||
}
|
||||
for (org.bukkit.Tag<Material> itemTag : Bukkit.getTags(Tag.REGISTRY_ITEMS, Material.class)) {
|
||||
for (Tag<Material> itemTag : Bukkit.getTags(Tag.REGISTRY_ITEMS, Material.class)) {
|
||||
ItemCategory.REGISTRY.register(itemTag.getKey().toString(), new ItemCategory(itemTag.getKey().toString()));
|
||||
}
|
||||
} catch (NoSuchMethodError e) {
|
||||
|
@ -1,7 +1,6 @@
|
||||
name: WorldEdit
|
||||
main: com.sk89q.worldedit.bukkit.WorldEditPlugin
|
||||
version: "${internalVersion}"
|
||||
load: STARTUP
|
||||
api-version: 1.13
|
||||
|
||||
# Permissions aren't here. Read http://wiki.sk89q.com/wiki/WEPIF/DinnerPerms
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren