summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-07-22 12:00:00 +1000
committermd_5 <git@md-5.net>2018-07-22 12:00:00 +1000
commit1a6b4f5392c8cda1e347c10976d394b47936dda6 (patch)
tree3b27585102b8348a432064ca1f1cad1e6488f1ad /src
parent961295e4327324766a0404857c1ca85051971995 (diff)
downloadcraftbukkit-1a6b4f5392c8cda1e347c10976d394b47936dda6.tar
craftbukkit-1a6b4f5392c8cda1e347c10976d394b47936dda6.tar.gz
craftbukkit-1a6b4f5392c8cda1e347c10976d394b47936dda6.tar.lz
craftbukkit-1a6b4f5392c8cda1e347c10976d394b47936dda6.tar.xz
craftbukkit-1a6b4f5392c8cda1e347c10976d394b47936dda6.zip
Update to Minecraft 1.13
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/mojang/brigadier/suggestion/SuggestionsBuilder.java80
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java20
-rw-r--r--src/main/java/org/bukkit/craftbukkit/Main.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBed.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java3
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java19
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanAbstract.java29
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWall.java48
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWallAbstract.java48
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java8
-rw-r--r--src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java6
-rw-r--r--src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java12
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/Commodore.java19
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java5
-rw-r--r--src/test/java/org/bukkit/LegacyTest.java3
-rw-r--r--src/test/java/org/bukkit/entity/TropicalFishTest.java2
-rw-r--r--src/test/java/org/bukkit/support/AbstractTestingBase.java2
20 files changed, 181 insertions, 135 deletions
diff --git a/src/main/java/com/mojang/brigadier/suggestion/SuggestionsBuilder.java b/src/main/java/com/mojang/brigadier/suggestion/SuggestionsBuilder.java
deleted file mode 100644
index 23c7c2c0..00000000
--- a/src/main/java/com/mojang/brigadier/suggestion/SuggestionsBuilder.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package com.mojang.brigadier.suggestion;
-
-import com.mojang.brigadier.Message;
-import com.mojang.brigadier.context.StringRange;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CompletableFuture;
-
-public class SuggestionsBuilder {
- private final String input;
- public int start;
- public String remaining;
- private final List<Suggestion> result = new ArrayList<>();
-
- public SuggestionsBuilder(final String input, final int start) {
- this.input = input;
- this.start = start;
- this.remaining = input.substring(start);
- }
-
- public String getInput() {
- return input;
- }
-
- public int getStart() {
- return start;
- }
-
- public String getRemaining() {
- return remaining;
- }
-
- public Suggestions build() {
- return Suggestions.create(input, result);
- }
-
- public CompletableFuture<Suggestions> buildFuture() {
- return CompletableFuture.completedFuture(build());
- }
-
- public SuggestionsBuilder suggest(final String text) {
- if (text.equals(remaining)) {
- return this;
- }
- result.add(new Suggestion(StringRange.between(start, input.length()), text));
- return this;
- }
-
- public SuggestionsBuilder suggest(final String text, final Message tooltip) {
- if (text.equals(remaining)) {
- return this;
- }
- result.add(new Suggestion(StringRange.between(start, input.length()), text, tooltip));
- return this;
- }
-
- public SuggestionsBuilder suggest(final int value) {
- result.add(new IntegerSuggestion(StringRange.between(start, input.length()), value));
- return this;
- }
-
- public SuggestionsBuilder suggest(final int value, final Message tooltip) {
- result.add(new IntegerSuggestion(StringRange.between(start, input.length()), value, tooltip));
- return this;
- }
-
- public SuggestionsBuilder add(final SuggestionsBuilder other) {
- result.addAll(other.result);
- return this;
- }
-
- public SuggestionsBuilder createOffset(final int start) {
- return new SuggestionsBuilder(input, start);
- }
-
- public SuggestionsBuilder restart() {
- return new SuggestionsBuilder(input, start);
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c86225c4..c5e1c037 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -882,25 +882,7 @@ public final class CraftServer implements Server {
generator = getGenerator(name);
}
- Convertable converter = new WorldLoaderServer(getWorldContainer().toPath(), getWorldContainer().toPath().resolveSibling("../backups"), getHandle().getServer().dataConverterManager);
- if (converter.isConvertable(name)) {
- getLogger().info("Converting world '" + name + "'");
- converter.convert(name, new IProgressUpdate() {
- private long b = System.currentTimeMillis();
-
- public void a(IChatBaseComponent ichatbasecomponent) {}
-
- public void a(int i) {
- if (System.currentTimeMillis() - this.b >= 1000L) {
- this.b = System.currentTimeMillis();
- MinecraftServer.LOGGER.info("Converting... {}%", Integer.valueOf(i));
- }
-
- }
-
- public void c(IChatBaseComponent ichatbasecomponent) {}
- });
- }
+ console.convertWorld(name);
int dimension = CraftWorld.CUSTOM_DIMENSION_OFFSET + console.worlds.size();
boolean used = false;
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index e8bf55e8..3fecc796 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -111,6 +111,8 @@ public class Main {
.defaultsTo(new File("commands.yml"))
.describedAs("Yml file");
+ acceptsAll(asList("forceUpgrade"), "Whether to force a world upgrade");
+
acceptsAll(asList("nojline"), "Disables jline and emulates the vanilla console");
acceptsAll(asList("noconsole"), "Disables the console");
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBed.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBed.java
index e91497d8..c71892a4 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBed.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBed.java
@@ -36,7 +36,7 @@ public class CraftBed extends CraftBlockEntityState<TileEntityBed> implements Be
case LIGHT_BLUE_BED:
return DyeColor.LIGHT_BLUE;
case LIGHT_GRAY_BED:
- return DyeColor.SILVER;
+ return DyeColor.LIGHT_GRAY;
case LIME_BED:
return DyeColor.LIME;
case MAGENTA_BED:
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index 4b2f7a05..94549cee 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -303,6 +303,9 @@ public class CraftBlockData implements BlockData {
register(net.minecraft.server.BlockCocoa.class, org.bukkit.craftbukkit.block.impl.CraftCocoa.class);
register(net.minecraft.server.BlockCommand.class, org.bukkit.craftbukkit.block.impl.CraftCommand.class);
register(net.minecraft.server.BlockCoralFan.class, org.bukkit.craftbukkit.block.impl.CraftCoralFan.class);
+ register(net.minecraft.server.BlockCoralFanAbstract.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanAbstract.class);
+ register(net.minecraft.server.BlockCoralFanWall.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanWall.class);
+ register(net.minecraft.server.BlockCoralFanWallAbstract.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanWallAbstract.class);
register(net.minecraft.server.BlockCrops.class, org.bukkit.craftbukkit.block.impl.CraftCrops.class);
register(net.minecraft.server.BlockDaylightDetector.class, org.bukkit.craftbukkit.block.impl.CraftDaylightDetector.class);
register(net.minecraft.server.BlockDirtSnow.class, org.bukkit.craftbukkit.block.impl.CraftDirtSnow.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java
index 3385af14..dde1a04b 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java
@@ -3,7 +3,7 @@
*/
package org.bukkit.craftbukkit.block.impl;
-public final class CraftCoralFan extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Directional {
+public final class CraftCoralFan extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Waterlogged {
public CraftCoralFan() {
super();
@@ -13,22 +13,17 @@ public final class CraftCoralFan extends org.bukkit.craftbukkit.block.data.Craft
super(state);
}
- // org.bukkit.craftbukkit.block.data.CraftDirectional
+ // org.bukkit.craftbukkit.block.data.CraftWaterlogged
- private static final net.minecraft.server.BlockStateEnum<?> FACING = getEnum(net.minecraft.server.BlockCoralFan.class, "facing");
+ private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockCoralFan.class, "waterlogged");
@Override
- public org.bukkit.block.BlockFace getFacing() {
- return get(FACING, org.bukkit.block.BlockFace.class);
+ public boolean isWaterlogged() {
+ return get(WATERLOGGED);
}
@Override
- public void setFacing(org.bukkit.block.BlockFace facing) {
- set(FACING, facing);
- }
-
- @Override
- public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
- return getValues(FACING, org.bukkit.block.BlockFace.class);
+ public void setWaterlogged(boolean waterlogged) {
+ set(WATERLOGGED, waterlogged);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanAbstract.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanAbstract.java
new file mode 100644
index 00000000..f1eddf70
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanAbstract.java
@@ -0,0 +1,29 @@
+/**
+ * Automatically generated file, changes will be lost.
+ */
+package org.bukkit.craftbukkit.block.impl;
+
+public final class CraftCoralFanAbstract extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Waterlogged {
+
+ public CraftCoralFanAbstract() {
+ super();
+ }
+
+ public CraftCoralFanAbstract(net.minecraft.server.IBlockData state) {
+ super(state);
+ }
+
+ // org.bukkit.craftbukkit.block.data.CraftWaterlogged
+
+ private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockCoralFanAbstract.class, "waterlogged");
+
+ @Override
+ public boolean isWaterlogged() {
+ return get(WATERLOGGED);
+ }
+
+ @Override
+ public void setWaterlogged(boolean waterlogged) {
+ set(WATERLOGGED, waterlogged);
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWall.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWall.java
new file mode 100644
index 00000000..8b89b6b4
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWall.java
@@ -0,0 +1,48 @@
+/**
+ * Automatically generated file, changes will be lost.
+ */
+package org.bukkit.craftbukkit.block.impl;
+
+public final class CraftCoralFanWall extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.CoralWallFan, org.bukkit.block.data.Directional, org.bukkit.block.data.Waterlogged {
+
+ public CraftCoralFanWall() {
+ super();
+ }
+
+ public CraftCoralFanWall(net.minecraft.server.IBlockData state) {
+ super(state);
+ }
+
+ // org.bukkit.craftbukkit.block.data.CraftDirectional
+
+ private static final net.minecraft.server.BlockStateEnum<?> FACING = getEnum(net.minecraft.server.BlockCoralFanWall.class, "facing");
+
+ @Override
+ public org.bukkit.block.BlockFace getFacing() {
+ return get(FACING, org.bukkit.block.BlockFace.class);
+ }
+
+ @Override
+ public void setFacing(org.bukkit.block.BlockFace facing) {
+ set(FACING, facing);
+ }
+
+ @Override
+ public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
+ return getValues(FACING, org.bukkit.block.BlockFace.class);
+ }
+
+ // org.bukkit.craftbukkit.block.data.CraftWaterlogged
+
+ private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockCoralFanWall.class, "waterlogged");
+
+ @Override
+ public boolean isWaterlogged() {
+ return get(WATERLOGGED);
+ }
+
+ @Override
+ public void setWaterlogged(boolean waterlogged) {
+ set(WATERLOGGED, waterlogged);
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWallAbstract.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWallAbstract.java
new file mode 100644
index 00000000..320f2f21
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWallAbstract.java
@@ -0,0 +1,48 @@
+/**
+ * Automatically generated file, changes will be lost.
+ */
+package org.bukkit.craftbukkit.block.impl;
+
+public final class CraftCoralFanWallAbstract extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.CoralWallFan, org.bukkit.block.data.Directional, org.bukkit.block.data.Waterlogged {
+
+ public CraftCoralFanWallAbstract() {
+ super();
+ }
+
+ public CraftCoralFanWallAbstract(net.minecraft.server.IBlockData state) {
+ super(state);
+ }
+
+ // org.bukkit.craftbukkit.block.data.CraftDirectional
+
+ private static final net.minecraft.server.BlockStateEnum<?> FACING = getEnum(net.minecraft.server.BlockCoralFanWallAbstract.class, "facing");
+
+ @Override
+ public org.bukkit.block.BlockFace getFacing() {
+ return get(FACING, org.bukkit.block.BlockFace.class);
+ }
+
+ @Override
+ public void setFacing(org.bukkit.block.BlockFace facing) {
+ set(FACING, facing);
+ }
+
+ @Override
+ public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
+ return getValues(FACING, org.bukkit.block.BlockFace.class);
+ }
+
+ // org.bukkit.craftbukkit.block.data.CraftWaterlogged
+
+ private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockCoralFanWallAbstract.class, "waterlogged");
+
+ @Override
+ public boolean isWaterlogged() {
+ return get(WATERLOGGED);
+ }
+
+ @Override
+ public void setWaterlogged(boolean waterlogged) {
+ set(WATERLOGGED, waterlogged);
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 13100e5d..6f23a968 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -472,12 +472,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public boolean isSwimming() {
- return getHandle().bb();
+ return getHandle().isSwimming();
}
@Override
public void setSwimming(boolean swimming) {
- getHandle().g(swimming);
+ getHandle().setSwimming(swimming);
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java
index 62c923e4..2f72f0ce 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java
@@ -63,7 +63,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
String baseStr = SerializableMeta.getString(map, BASE.BUKKIT, true);
if (baseStr != null) {
- base = DyeColor.valueOf(baseStr);
+ base = DyeColor.legacyValueOf(baseStr);
}
Iterable<?> rawPatternList = SerializableMeta.getObject(Iterable.class, map, PATTERNS.BUKKIT, true);
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
index 822600fe..3f8f1754 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
@@ -6,6 +6,7 @@ import net.minecraft.server.ScoreboardServer;
import org.apache.commons.lang.Validate;
import org.bukkit.OfflinePlayer;
+import org.bukkit.craftbukkit.util.CraftChatMessage;
import org.bukkit.scoreboard.DisplaySlot;
import org.bukkit.scoreboard.Objective;
import org.bukkit.scoreboard.Score;
@@ -33,16 +34,15 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective
public String getDisplayName() throws IllegalStateException {
CraftScoreboard scoreboard = checkState();
- return objective.getDisplayName();
+ return CraftChatMessage.fromComponent(objective.getDisplayName());
}
public void setDisplayName(String displayName) throws IllegalStateException, IllegalArgumentException {
Validate.notNull(displayName, "Display name cannot be null");
- Validate.isTrue(displayName.length() <= 32, "Display name '" + displayName + "' is longer than the limit of 32 characters");
+ Validate.isTrue(displayName.length() <= 128, "Display name '" + displayName + "' is longer than the limit of 128 characters");
CraftScoreboard scoreboard = checkState();
- objective.displayName = displayName;
- ((ScoreboardServer) scoreboard.board).handleObjectiveChanged(objective);
+ objective.setDisplayName(CraftChatMessage.fromStringOrNull(displayName));
}
public String getCriteria() throws IllegalStateException {
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
index 573b9cd1..61c0a55c 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
@@ -16,6 +16,8 @@ import org.bukkit.scoreboard.Team;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
+import net.minecraft.server.IScoreboardCriteria;
+import org.bukkit.craftbukkit.util.CraftChatMessage;
public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
final Scoreboard board;
@@ -35,11 +37,11 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
Validate.notNull(criteria, "Criteria cannot be null");
Validate.notNull(displayName, "Display name cannot be null");
Validate.isTrue(name.length() <= 16, "The name '" + name + "' is longer than the limit of 16 characters");
- Validate.isTrue(displayName.length() <= 32, "The display name '" + displayName + "' is longer than the limit of 32 characters");
+ Validate.isTrue(displayName.length() <= 128, "The display name '" + displayName + "' is longer than the limit of 128 characters");
Validate.isTrue(board.getObjective(name) == null, "An objective of name '" + name + "' already exists");
CraftCriteria craftCriteria = CraftCriteria.getFromBukkit(criteria);
- ScoreboardObjective objective = board.registerObjective(name, craftCriteria.criteria, displayName);
+ ScoreboardObjective objective = board.registerObjective(name, craftCriteria.criteria, CraftChatMessage.fromStringOrNull(displayName), IScoreboardCriteria.EnumScoreboardHealthDisplay.INTEGER);
return new CraftObjective(this, objective);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
index cb9ac0f7..c511fa88 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
@@ -33,7 +33,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
public String getDisplayName() throws IllegalStateException {
CraftScoreboard scoreboard = checkState();
- return team.getDisplayName();
+ return CraftChatMessage.fromComponent(team.getDisplayName());
}
public void setDisplayName(String displayName) throws IllegalStateException {
@@ -41,13 +41,13 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
Validate.isTrue(displayName.length() <= 128, "Display name '" + displayName + "' is longer than the limit of 128 characters");
CraftScoreboard scoreboard = checkState();
- team.setDisplayName(displayName);
+ team.setDisplayName(CraftChatMessage.fromStringOrNull(displayName));
}
public String getPrefix() throws IllegalStateException {
CraftScoreboard scoreboard = checkState();
- return CraftChatMessage.fromComponent(team.e());
+ return CraftChatMessage.fromComponent(team.getPrefix());
}
public void setPrefix(String prefix) throws IllegalStateException, IllegalArgumentException {
@@ -55,13 +55,13 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
Validate.isTrue(prefix.length() <= 64, "Prefix '" + prefix + "' is longer than the limit of 64 characters");
CraftScoreboard scoreboard = checkState();
- team.a(CraftChatMessage.fromStringOrNull(prefix));
+ team.setPrefix(CraftChatMessage.fromStringOrNull(prefix));
}
public String getSuffix() throws IllegalStateException {
CraftScoreboard scoreboard = checkState();
- return CraftChatMessage.fromComponent(team.f());
+ return CraftChatMessage.fromComponent(team.getPrefix());
}
public void setSuffix(String suffix) throws IllegalStateException, IllegalArgumentException {
@@ -69,7 +69,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
Validate.isTrue(suffix.length() <= 64, "Suffix '" + suffix + "' is longer than the limit of 64 characters");
CraftScoreboard scoreboard = checkState();
- team.b(CraftChatMessage.fromStringOrNull(suffix));
+ team.setSuffix(CraftChatMessage.fromStringOrNull(suffix));
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
index b4c1c68c..c31bb74d 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -171,6 +171,16 @@ public class Commodore
}
}
+ if ( owner.equals( "org/bukkit/DyeColor" ) )
+ {
+ switch ( name )
+ {
+ case "SILVER":
+ super.visitFieldInsn( opcode, owner, "LIGHT_GRAY", desc );
+ return;
+ }
+ }
+
if ( owner.equals( "org/bukkit/Particle" ) )
{
switch ( name )
@@ -229,6 +239,15 @@ public class Commodore
return;
}
+ if ( owner.equals( "org/bukkit/DyeColor" ) )
+ {
+ if ( name.equals( "valueOf" ) && desc.equals( "(Ljava/lang/String;)Lorg/bukkit/DyeColor;" ) )
+ {
+ super.visitMethodInsn( opcode, owner, "legacyValueOf", desc, itf );
+ return;
+ }
+ }
+
if ( owner.equals( "org/bukkit/Material" ) )
{
if ( name.equals( "getMaterial" ) && desc.equals( "(I)Lorg/bukkit/Material;" ) )
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index fbdfdc47..d7abc0f5 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -138,7 +138,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
return CraftBlockData.fromData(getBlock(material, data));
}
- public static final int DATA_VERSION = 1513;
+ public static final int DATA_VERSION = 1519;
@Override
public int getDataVersion() {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
index 1833ee72..2d6e7089 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
@@ -88,11 +88,6 @@ public class DummyGeneratorAccess implements GeneratorAccess {
}
@Override
- public void a(String string, PersistentBase pb) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- @Override
public IChunkProvider getChunkProvider() {
throw new UnsupportedOperationException("Not supported yet.");
}
diff --git a/src/test/java/org/bukkit/LegacyTest.java b/src/test/java/org/bukkit/LegacyTest.java
index 543e7581..fbc9e85c 100644
--- a/src/test/java/org/bukkit/LegacyTest.java
+++ b/src/test/java/org/bukkit/LegacyTest.java
@@ -31,6 +31,9 @@ public class LegacyTest extends AbstractTestingBase {
Material.HEART_OF_THE_SEA, Material.HORN_CORAL, Material.HORN_CORAL_BLOCK, Material.HORN_CORAL_FAN, Material.NAUTILUS_SHELL, Material.PHANTOM_MEMBRANE, Material.SEA_PICKLE, Material.TUBE_CORAL, Material.TUBE_CORAL_BLOCK,
Material.TUBE_CORAL_FAN, Material.STRIPPED_ACACIA_WOOD, Material.STRIPPED_BIRCH_WOOD, Material.STRIPPED_DARK_OAK_WOOD, Material.STRIPPED_JUNGLE_WOOD, Material.STRIPPED_OAK_WOOD, Material.STRIPPED_SPRUCE_WOOD,
Material.ACACIA_WOOD, Material.BIRCH_WOOD, Material.DARK_OAK_WOOD, Material.JUNGLE_WOOD, Material.OAK_WOOD, Material.SPRUCE_WOOD,
+ Material.TUBE_CORAL_WALL_FAN, Material.BRAIN_CORAL_WALL_FAN, Material.BUBBLE_CORAL_WALL_FAN, Material.FIRE_CORAL_WALL_FAN, Material.HORN_CORAL_WALL_FAN, Material.DEAD_TUBE_CORAL_WALL_FAN, Material.DEAD_BRAIN_CORAL_WALL_FAN,
+ Material.DEAD_BUBBLE_CORAL_WALL_FAN, Material.DEAD_FIRE_CORAL_WALL_FAN, Material.DEAD_HORN_CORAL_WALL_FAN, Material.DEAD_TUBE_CORAL_FAN, Material.DEAD_BRAIN_CORAL_FAN, Material.DEAD_BUBBLE_CORAL_FAN, Material.DEAD_FIRE_CORAL_FAN,
+ Material.DEAD_HORN_CORAL_FAN,
//
Material.LEGACY_AIR, Material.LEGACY_DEAD_BUSH, Material.LEGACY_BURNING_FURNACE, Material.LEGACY_WALL_SIGN, Material.LEGACY_REDSTONE_TORCH_OFF, Material.LEGACY_SKULL, Material.LEGACY_REDSTONE_COMPARATOR_ON, Material.LEGACY_WALL_BANNER, Material.LEGACY_MONSTER_EGG));
diff --git a/src/test/java/org/bukkit/entity/TropicalFishTest.java b/src/test/java/org/bukkit/entity/TropicalFishTest.java
index 63ddb467..b65dc340 100644
--- a/src/test/java/org/bukkit/entity/TropicalFishTest.java
+++ b/src/test/java/org/bukkit/entity/TropicalFishTest.java
@@ -31,7 +31,7 @@ public class TropicalFishTest {
testVariant(117506305, DyeColor.ORANGE, DyeColor.GRAY, Pattern.STRIPEY);
testVariant(117899265, DyeColor.GRAY, DyeColor.GRAY, Pattern.FLOPPER);
testVariant(118161664, DyeColor.BLUE, DyeColor.GRAY, Pattern.SUNSTREAK);
- testVariant(134217984, DyeColor.WHITE, DyeColor.SILVER, Pattern.SUNSTREAK);
+ testVariant(134217984, DyeColor.WHITE, DyeColor.LIGHT_GRAY, Pattern.SUNSTREAK);
testVariant(234882305, DyeColor.WHITE, DyeColor.RED, Pattern.CLAYFISH);
testVariant(235340288, DyeColor.GRAY, DyeColor.RED, Pattern.SNOOPER);
}
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
index 6266dc32..b6bc6641 100644
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
@@ -43,6 +43,6 @@ public abstract class AbstractTestingBase {
}
}
INVALIDATED_MATERIALS = builder.build();
- Assert.assertTrue("Expected 533 invalidated materials (got " + INVALIDATED_MATERIALS.size() + ")", INVALIDATED_MATERIALS.size() == 533);
+ Assert.assertTrue("Expected 543 invalidated materials (got " + INVALIDATED_MATERIALS.size() + ")", INVALIDATED_MATERIALS.size() == 543);
}
}