Skip to content

Commit 00f5518

Browse files
committed
Update for latest mappings
1 parent acfe6ba commit 00f5518

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/main/java/mmd/orespawn/command/AddOreCommand.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323

2424
public class AddOreCommand extends CommandBase {
2525
@Override
26-
public String getCommandName() {
26+
public String getName() {
2727
return "addore";
2828
}
2929

3030
@Override
31-
public String getCommandUsage(ICommandSender sender) {
31+
public String getUsage(ICommandSender sender) {
3232
return "/addore <file> <dimension|all>";
3333
}
3434

@@ -46,7 +46,7 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args
4646
} else if (!(stack.getItem() instanceof ItemBlock)) {
4747
throw new CommandException("The item in your main hand isn't a block");
4848
} else if (args.length != 2) {
49-
throw new CommandException(this.getCommandUsage(sender));
49+
throw new CommandException(this.getUsage(sender));
5050
}
5151

5252
File file = new File(".", "orespawn" + File.separator + args[0] + ".json");
@@ -105,7 +105,7 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args
105105
throw new CommandException("Failed to read the json file");
106106
}
107107

108-
player.addChatComponentMessage(new TextComponentString("Added " + state.getBlock().getRegistryName().toString() + " to the json"));
108+
player.sendStatusMessage(new TextComponentString("Added " + state.getBlock().getRegistryName().toString() + " to the json"), false);
109109
}
110110

111111
private void saveFile(JsonArray array, File file) throws CommandException {
@@ -121,6 +121,6 @@ private void saveFile(JsonArray array, File file) throws CommandException {
121121

122122
@Override
123123
public int compareTo(ICommand command) {
124-
return this.getCommandName().compareTo(command.getCommandName());
124+
return this.getName().compareTo(command.getName());
125125
}
126126
}

src/main/java/mmd/orespawn/command/ClearChunkCommand.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
public class ClearChunkCommand extends CommandBase {
1616
@Override
17-
public String getCommandName() {
17+
public String getName() {
1818
return "clearchunk";
1919
}
2020

2121
@Override
22-
public String getCommandUsage(ICommandSender sender) {
22+
public String getUsage(ICommandSender sender) {
2323
return "/clearchunk";
2424
}
2525

@@ -37,10 +37,10 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args
3737
for (int y = 0; y < 256; y++) {
3838
for (int z = chunkPos.getZStart(); z <= chunkPos.getZEnd(); z++) {
3939
BlockPos pos = new BlockPos(x, y, z);
40-
Block block = player.worldObj.getBlockState(pos).getBlock();
40+
Block block = player.world.getBlockState(pos).getBlock();
4141

4242
if (OreSpawnWorldGenerator.SPAWN_BLOCKS.contains(block)) {
43-
player.worldObj.setBlockToAir(pos);
43+
player.world.setBlockToAir(pos);
4444
}
4545
}
4646
}
@@ -49,6 +49,6 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args
4949

5050
@Override
5151
public int compareTo(ICommand command) {
52-
return this.getCommandName().compareTo(command.getCommandName());
52+
return this.getName().compareTo(command.getName());
5353
}
5454
}

src/main/java/mmd/orespawn/command/DumpBiomesCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121

2222
public class DumpBiomesCommand extends CommandBase {
2323
@Override
24-
public String getCommandName() {
24+
public String getName() {
2525
return "dumpbiomes";
2626
}
2727

2828
@Override
29-
public String getCommandUsage(ICommandSender sender) {
29+
public String getUsage(ICommandSender sender) {
3030
return "/dumpbiomes";
3131
}
3232

@@ -47,11 +47,11 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args
4747
throw new CommandException("Failed to save the json file");
4848
}
4949

50-
sender.addChatMessage(new TextComponentString("Done"));
50+
sender.sendMessage(new TextComponentString("Done"));
5151
}
5252

5353
@Override
5454
public int compareTo(ICommand command) {
55-
return this.getCommandName().compareTo(command.getCommandName());
55+
return this.getName().compareTo(command.getName());
5656
}
5757
}

0 commit comments

Comments
 (0)