fix: lobby ownership, duplicate locations, hook hologram, TP hooked players back
This commit is contained in:
parent
183df22d13
commit
2706d6d123
7 changed files with 75 additions and 9 deletions
|
|
@ -228,16 +228,31 @@ public class SetupCommand implements TabExecutor {
|
|||
|
||||
switch (mode) {
|
||||
case "hook" -> {
|
||||
locations.addLocation("hooks", blockLoc.clone().add(0.5, 0, 0.5));
|
||||
Location hLoc = blockLoc.clone().add(0.5, 0, 0.5);
|
||||
if (locations.hasLocation("hooks", hLoc)) {
|
||||
player.sendMessage(messages().get("setup.duplicate"));
|
||||
break;
|
||||
}
|
||||
locations.addLocation("hooks", hLoc);
|
||||
player.sendMessage(messages().get("setup.hook-placed", formatLoc(loc)));
|
||||
}
|
||||
case "chest" -> {
|
||||
locations.addLocation("chests", blockLoc.clone().add(0.5, 0, 0.5));
|
||||
Location cLoc = blockLoc.clone().add(0.5, 0, 0.5);
|
||||
if (locations.hasLocation("chests", cLoc)) {
|
||||
player.sendMessage(messages().get("setup.duplicate"));
|
||||
break;
|
||||
}
|
||||
locations.addLocation("chests", cLoc);
|
||||
player.sendMessage(messages().get("setup.chest-placed", formatLoc(loc)));
|
||||
}
|
||||
case "generator" -> {
|
||||
locations.addLocation("generators", blockLoc.clone().add(0.5, 0, 0.5));
|
||||
plugin.getGeneratorData().addGenerator(blockLoc.clone().add(0.5, 0, 0.5));
|
||||
Location gLoc = blockLoc.clone().add(0.5, 0, 0.5);
|
||||
if (locations.hasLocation("generators", gLoc)) {
|
||||
player.sendMessage(messages().get("setup.duplicate"));
|
||||
break;
|
||||
}
|
||||
locations.addLocation("generators", gLoc);
|
||||
plugin.getGeneratorData().addGenerator(gLoc);
|
||||
player.sendMessage(messages().get("setup.generator-placed", formatLoc(loc)));
|
||||
}
|
||||
case "killer-spawn" -> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue