Update the Bukkit adapter to the Spigot API Preview

This commit is contained in:
Matthew Miller
2018-07-12 22:23:03 +10:00
parent 724661d903
commit ca06a05117
29 changed files with 139 additions and 650 deletions

View File

@ -34,7 +34,7 @@ public class TestOfflinePermissible implements OfflinePlayer, Permissible {
private boolean op;
private UUID randomUuid = UUID.randomUUID();
private final Map<String, Boolean> assignedPermissions = new HashMap<String, Boolean>();
private final Map<String, Boolean> assignedPermissions = new HashMap<>();
@Override
public boolean isOp() {
@ -101,7 +101,7 @@ public class TestOfflinePermissible implements OfflinePlayer, Permissible {
@Override
public Set<PermissionAttachmentInfo> getEffectivePermissions() {
Set<PermissionAttachmentInfo> ret = new HashSet<PermissionAttachmentInfo>();
Set<PermissionAttachmentInfo> ret = new HashSet<>();
for (Map.Entry<String, Boolean> entry : assignedPermissions.entrySet()) {
ret.add(new PermissionAttachmentInfo(this, entry.getKey(), null, entry.getValue()));
}
@ -141,11 +141,6 @@ public class TestOfflinePermissible implements OfflinePlayer, Permissible {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setBanned(boolean b) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean isWhitelisted() {
throw new UnsupportedOperationException("Not supported yet.");

View File

@ -27,10 +27,9 @@ public class BukkitWorldTest {
@Test
public void testTreeTypeMapping() {
// TODO
// for (TreeGenerator.TreeType type : TreeGenerator.TreeType.values()) {
// Assert.assertFalse("No mapping for: " + type, BukkitWorld.toBukkitTreeType(type) == null);
// }
for (TreeGenerator.TreeType type : TreeGenerator.TreeType.values()) {
// Assert.assertNotNull("No mapping for: " + type, BukkitWorld.toBukkitTreeType(type)); // TODO
}
}
}