mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Few tweaks to schematic loading and error fixes.
* Not all EntityTypes in Bukkit have the correct enum name. * Don't read entire schematic files to list. Go off file extension only. (Reading in files is more accurate, but slow.) * Enforce extensions. (Due to the above, while you can technically make a schematic called 'test.txt', it's better that we save it as 'test.txt.schem'.) * Fix a few minor warnings.
This commit is contained in:
@ -160,7 +160,10 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
|
||||
}
|
||||
// Entity
|
||||
for (org.bukkit.entity.EntityType entityType : org.bukkit.entity.EntityType.values()) {
|
||||
EntityType.REGISTRY.register("minecraft:" + entityType.name().toLowerCase(), new EntityType("minecraft:" + entityType.name().toLowerCase()));
|
||||
String mcid = entityType.getName();
|
||||
if (mcid != null) {
|
||||
EntityType.REGISTRY.register("minecraft:" + mcid.toLowerCase(), new EntityType("minecraft:" + mcid.toLowerCase()));
|
||||
}
|
||||
}
|
||||
// Tags
|
||||
try {
|
||||
|
Reference in New Issue
Block a user