This commit is contained in:
Tyler Murphy 2022-11-26 14:23:39 -05:00
parent 3ec241766d
commit 6b453dde97
41 changed files with 297 additions and 679 deletions

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek;
import net.tylermurphy.hideAndSeek.command.*;
@ -204,6 +185,7 @@ public class Main extends JavaPlugin implements Listener {
getServer().getPluginManager().registerEvents(new MovementHandler(), this);
getServer().getPluginManager().registerEvents(new PlayerHandler(), this);
getServer().getPluginManager().registerEvents(new RespawnHandler(), this);
getServer().getPluginManager().registerEvents(new WorldInteractHandler(), this);
}
private void updateVersion(){

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command;
import net.tylermurphy.hideAndSeek.Main;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command;
import net.tylermurphy.hideAndSeek.Main;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command;
import net.tylermurphy.hideAndSeek.Main;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command;
import net.tylermurphy.hideAndSeek.Main;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command;
import net.tylermurphy.hideAndSeek.command.util.ICommand;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command;
import net.tylermurphy.hideAndSeek.Main;
@ -59,13 +40,8 @@ public class Start implements ICommand {
} else {
seekerName = args[0];
}
Player temp = Bukkit.getPlayer(seekerName);
if (temp == null) {
sender.sendMessage(errorPrefix + message("START_INVALID_NAME").addPlayer(seekerName));
return;
}
Player seeker = Main.getInstance().getBoard().getPlayer(temp.getUniqueId());
if (seeker == null) {
Player seeker = Bukkit.getPlayer(seekerName);
if (seeker == null || !Main.getInstance().getBoard().contains(seeker)) {
sender.sendMessage(errorPrefix + message("START_INVALID_NAME").addPlayer(seekerName));
return;
}

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command;
import net.tylermurphy.hideAndSeek.Main;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command;
import net.tylermurphy.hideAndSeek.Main;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command;
import net.tylermurphy.hideAndSeek.Main;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command.map;
import net.tylermurphy.hideAndSeek.Main;
@ -53,7 +34,7 @@ public class Save implements ICommand {
sender.sendMessage(errorPrefix + message("INVALID_MAP"));
return;
}
if (map.isSpawnNotSetup()) {
if (map.getSpawn().isNotSetup()) {
sender.sendMessage(errorPrefix + message("ERROR_GAME_SPAWN"));
return;
}

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command.map;
import net.tylermurphy.hideAndSeek.command.util.ICommand;

View file

@ -20,6 +20,10 @@ import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
public class Enabled implements ICommand {
public void execute(Player sender, String[] args) {
if (!Main.getInstance().supports(9)) {
sender.sendMessage(errorPrefix + message("BLOCKHUNT_UNSUPPORTED"));
return;
}
if (Main.getInstance().getGame().getStatus() != Status.STANDBY) {
sender.sendMessage(errorPrefix + message("GAME_INPROGRESS"));
return;

View file

@ -20,6 +20,10 @@ import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
public class Add implements ICommand {
public void execute(Player sender, String[] args) {
if (!Main.getInstance().supports(9)) {
sender.sendMessage(errorPrefix + message("BLOCKHUNT_UNSUPPORTED"));
return;
}
if (Main.getInstance().getGame().getStatus() != Status.STANDBY) {
sender.sendMessage(errorPrefix + message("GAME_INPROGRESS"));
return;

View file

@ -1,5 +1,6 @@
package net.tylermurphy.hideAndSeek.command.map.blockhunt.blocks;
import net.tylermurphy.hideAndSeek.Main;
import net.tylermurphy.hideAndSeek.command.util.ICommand;
import net.tylermurphy.hideAndSeek.configuration.Map;
import net.tylermurphy.hideAndSeek.configuration.Maps;
@ -17,6 +18,10 @@ import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
public class List implements ICommand {
public void execute(Player sender, String[] args) {
if (!Main.getInstance().supports(9)) {
sender.sendMessage(errorPrefix + message("BLOCKHUNT_UNSUPPORTED"));
return;
}
Map map = Maps.getMap(args[0]);
if(map == null) {
sender.sendMessage(errorPrefix + message("INVALID_MAP"));

View file

@ -20,6 +20,10 @@ import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
public class Remove implements ICommand {
public void execute(Player sender, String[] args) {
if (!Main.getInstance().supports(9)) {
sender.sendMessage(errorPrefix + message("BLOCKHUNT_UNSUPPORTED"));
return;
}
if (Main.getInstance().getGame().getStatus() != Status.STANDBY) {
sender.sendMessage(errorPrefix + message("GAME_INPROGRESS"));
return;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command.map.set;
import net.tylermurphy.hideAndSeek.Main;
@ -46,7 +27,7 @@ public class Border implements ICommand {
sender.sendMessage(errorPrefix + message("INVALID_MAP"));
return;
}
if (map.isSpawnNotSetup()) {
if (map.getSpawn().isNotSetup()) {
sender.sendMessage(errorPrefix + message("ERROR_GAME_SPAWN"));
return;
}

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command.map.set;
import net.tylermurphy.hideAndSeek.Main;
@ -24,6 +5,7 @@ import net.tylermurphy.hideAndSeek.command.util.ICommand;
import net.tylermurphy.hideAndSeek.configuration.Map;
import net.tylermurphy.hideAndSeek.configuration.Maps;
import net.tylermurphy.hideAndSeek.game.util.Status;
import net.tylermurphy.hideAndSeek.util.Location;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
@ -45,10 +27,14 @@ public class Bounds implements ICommand {
sender.sendMessage(errorPrefix + message("INVALID_MAP"));
return;
}
if (map.isSpawnNotSetup()) {
if (map.getSpawn().isNotSetup()) {
sender.sendMessage(errorPrefix + message("ERROR_GAME_SPAWN"));
return;
}
if (map.getSeekerLobby().isNotSetup()) {
sender.sendMessage(errorPrefix + message("ERROR_GAME_SEEKER_SPAWN"));
return;
}
if (!sender.getWorld().getName().equals(map.getSpawnName())) {
sender.sendMessage(errorPrefix + message("BOUNDS_WRONG_WORLD"));
return;
@ -87,6 +73,20 @@ public class Bounds implements ICommand {
}
map.setBoundMin(bxs, bzs);
map.setBoundMax(bxl, bzl);
if(!map.isBoundsNotSetup()) {
if(!map.getSpawn().isNotSetup()) {
if(map.getSpawn().isNotInBounds(bxs, bxl, bzs, bzl)) {
map.setSpawn(Location.getDefault());
sender.sendMessage(warningPrefix + message("WARN_SPAWN_RESET"));
}
}
if(!map.getSeekerLobby().isNotSetup()) {
if(map.getSeekerLobby().isNotInBounds(bxs, bxl, bzs, bzl)) {
map.setSeekerLobby(Location.getDefault());
sender.sendMessage(warningPrefix + message("WARN_SEEKER_SPAWN_RESET"));
}
}
}
Maps.setMap(map.getName(), map);
sender.sendMessage(messagePrefix + message("BOUNDS").addAmount(first ? 1 : 2));
}

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command.map.set;
import net.tylermurphy.hideAndSeek.command.util.ICommand;

View file

@ -6,24 +6,33 @@ import net.tylermurphy.hideAndSeek.command.location.Locations;
import net.tylermurphy.hideAndSeek.configuration.Maps;
import net.tylermurphy.hideAndSeek.util.Location;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.List;;
import java.util.stream.Collectors;
import static net.tylermurphy.hideAndSeek.configuration.Config.warningPrefix;
import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
public class SeekerLobby implements ICommand {
public void execute(Player sender, String[] args) {
LocationUtils.setLocation(sender, Locations.SEEKER, args[0], map -> {
if(map.isSpawnNotSetup()) {
if(map.getSpawn().isNotSetup()) {
throw new RuntimeException(message("GAME_SPAWN_NEEDED").toString());
}
if(!map.getSpawnName().equals(sender.getLocation().getWorld().getName())) {
throw new RuntimeException(message("SEEKER_LOBBY_INVALID").toString());
}
map.setSeekerLobby(Location.from(sender));
if(!map.isBoundsNotSetup()) {
Vector boundsMin = map.getBoundsMin();
Vector boundsMax = map.getBoundsMax();
if(map.getSeekerLobby().isNotInBounds(boundsMin.getBlockX(), boundsMax.getBlockX(), boundsMin.getBlockZ(), boundsMax.getBlockZ())) {
sender.sendMessage(warningPrefix + message("WARN_MAP_BOUNDS"));
}
}
});
}

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command.map.set;
import net.tylermurphy.hideAndSeek.command.util.ICommand;
@ -47,8 +28,16 @@ public class Spawn implements ICommand {
map.setSpawn(Location.from(sender));
if(!map.isBoundsNotSetup()) {
Vector boundsMin = map.getBoundsMin();
Vector boundsMax = map.getBoundsMax();
if(map.getSpawn().isNotInBounds(boundsMin.getBlockX(), boundsMax.getBlockX(), boundsMin.getBlockZ(), boundsMax.getBlockZ())) {
sender.sendMessage(warningPrefix + message("WARN_MAP_BOUNDS"));
}
}
if(map.getSeekerLobby().getWorld() != null && !map.getSeekerLobby().getWorld().equals(sender.getLocation().getWorld().getName())) {
sender.sendMessage(message("SEEKER_LOBBY_SPAWN_RESET").toString());
sender.sendMessage(warningPrefix + message("SEEKER_LOBBY_SPAWN_RESET"));
map.setSeekerLobby(Location.getDefault());
}

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command.util;
import net.tylermurphy.hideAndSeek.command.map.Save;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.command.util;
import org.bukkit.entity.Player;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.configuration;
import com.cryptomorin.xseries.XItemStack;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.configuration;
import net.tylermurphy.hideAndSeek.Main;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.configuration;
import com.cryptomorin.xseries.XItemStack;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.configuration;
import net.md_5.bungee.api.ChatColor;
@ -38,7 +19,8 @@ public class Localization {
});
put("de-DE", new String[][]{
{},
{"TAUNTED"}
{"TAUNTED"},
{"GAME_SETUP", "SETUP_GAME", "SETUP_LOBBY", "SETUP_SEEKER_LOBBY", "SETUP_EXIT", "SETUP_SAVEMAP", "SETUP_BOUNDS"}
});
}};

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.configuration;
import org.bukkit.entity.Entity;

View file

@ -3,6 +3,7 @@ package net.tylermurphy.hideAndSeek.configuration;
import java.util.ArrayList;
import java.util.List;
import net.tylermurphy.hideAndSeek.Main;
import net.tylermurphy.hideAndSeek.game.events.Border;
import net.tylermurphy.hideAndSeek.world.WorldLoader;
import net.tylermurphy.hideAndSeek.util.Location;
@ -80,7 +81,11 @@ public class Map {
}
public void setBlockhunt(boolean enabled, List<Material> blocks) {
this.blockhunt = enabled;
if (Main.getInstance().supports(9)) {
this.blockhunt = enabled;
} else {
this.blockhunt = false;
}
this.blockhuntBlocks = blocks;
}
@ -226,10 +231,6 @@ public class Map {
return xBoundMin == 0 || zBoundMin == 0 || xBoundMax == 0 || zBoundMax == 0;
}
public boolean isSpawnNotSetup() {
return spawnPosition.getBlockX() == 0 && spawnPosition.getBlockY() == 0 && spawnPosition.getBlockZ() == 0;
}
public boolean isBoundsNotSetup() {
return xBoundMin == 0 || zBoundMin == 0 || xBoundMax == 0 || zBoundMax == 0;
}

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.database;
import com.google.common.io.ByteStreams;

View file

@ -175,10 +175,10 @@ public class GameDataTable {
@NotNull Board board,
@NotNull List<UUID> uuids,
@NotNull List<UUID> winners,
@NotNull Map<String,Integer> hider_kills,
@NotNull Map<String,Integer> hider_deaths,
@NotNull Map<String,Integer> seeker_kills,
@NotNull Map<String,Integer> seeker_deaths,
@NotNull Map<UUID,Integer> hider_kills,
@NotNull Map<UUID,Integer> hider_deaths,
@NotNull Map<UUID,Integer> seeker_kills,
@NotNull Map<UUID,Integer> seeker_deaths,
@NotNull WinType type
) {
for(UUID uuid : uuids) {
@ -192,10 +192,10 @@ public class GameDataTable {
info.getSeekerWins() + (winners.contains(uuid) && type == WinType.SEEKER_WIN ? 1 : 0),
info.getHiderGames() + (board.isHider(uuid) || (board.isSeeker(uuid) && !board.getFirstSeeker().getUniqueId().equals(uuid)) ? 1 : 0),
info.getSeekerGames() + (board.getFirstSeeker().getUniqueId().equals(uuid) ? 1 : 0),
info.getHiderKills() + hider_kills.getOrDefault(uuid.toString(), 0),
info.getSeekerKills() + seeker_kills.getOrDefault(uuid.toString(), 0),
info.getHiderDeaths() + hider_deaths.getOrDefault(uuid.toString(), 0),
info.getSeekerDeaths() + seeker_deaths.getOrDefault(uuid.toString(), 0)
info.getHiderKills() + hider_kills.getOrDefault(uuid, 0),
info.getSeekerKills() + seeker_kills.getOrDefault(uuid, 0),
info.getHiderDeaths() + hider_deaths.getOrDefault(uuid, 0),
info.getSeekerDeaths() + seeker_deaths.getOrDefault(uuid, 0)
);
}
}

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.game;
import net.tylermurphy.hideAndSeek.Main;
@ -38,109 +19,128 @@ import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
public class Board {
private final List<String> Hider = new ArrayList<>(), Seeker = new ArrayList<>(), Spectator = new ArrayList<>();
private final Map<String, Player> playerList = new HashMap<>();
private final Map<String, CustomBoard> customBoards = new HashMap<>();
private final Map<String, Integer> hider_kills = new HashMap<>(), seeker_kills = new HashMap<>(), hider_deaths = new HashMap<>(), seeker_deaths = new HashMap<>();
private enum Type {
HIDER,
SEEKER,
SPECTATOR,
}
private UUID initialSeeker = null;
private final Map<UUID, Type> Players = new HashMap<>();
private final Map<UUID, CustomBoard> customBoards = new HashMap<>();
private final Map<UUID, Integer> hider_kills = new HashMap<>(), seeker_kills = new HashMap<>(), hider_deaths = new HashMap<>(), seeker_deaths = new HashMap<>();
public boolean contains(Player player) {
return playerList.containsKey(player.getUniqueId().toString());
return Players.containsKey(player.getUniqueId());
}
public boolean isHider(Player player) {
return Hider.contains(player.getUniqueId().toString());
return isHider(player.getUniqueId());
}
public boolean isHider(UUID uuid) {
return Hider.contains(uuid.toString());
if(!Players.containsKey(uuid)) return false;
return Players.get(uuid) == Type.HIDER;
}
public boolean isSeeker(Player player) {
return Seeker.contains(player.getUniqueId().toString());
return isSeeker(player.getUniqueId());
}
public boolean isSeeker(UUID uuid) {
return Seeker.contains(uuid.toString());
if(!Players.containsKey(uuid)) return false;
return Players.get(uuid) == Type.SEEKER;
}
public boolean isSpectator(Player player) {
return Spectator.contains(player.getUniqueId().toString());
return isSpectator(player.getUniqueId());
}
public boolean isSpectator(UUID uuid) {
if(!Players.containsKey(uuid)) return false;
return Players.get(uuid) == Type.SPECTATOR;
}
public int sizeHider() {
return Hider.size();
return getHiders().size();
}
public int sizeSeeker() {
return Seeker.size();
return getSeekers().size();
}
public int size() {
return playerList.values().size();
return getPlayers().size();
}
public List<Player> getHiders() {
return Hider.stream().filter(Objects::nonNull).map(playerList::get).filter(Objects::nonNull).collect(Collectors.toList());
return Players.keySet().stream()
.filter(s -> Players.get(s) == Type.HIDER)
.map(Bukkit::getPlayer)
.filter(Objects::nonNull)
.collect(Collectors.toList());
}
public List<Player> getSeekers() {
return Seeker.stream().filter(Objects::nonNull).map(playerList::get).filter(Objects::nonNull).collect(Collectors.toList());
}
public Player getFirstSeeker() {
return playerList.get(Seeker.get(0));
return Players.keySet().stream()
.filter(s -> Players.get(s) == Type.SEEKER)
.map(Bukkit::getPlayer)
.filter(Objects::nonNull)
.collect(Collectors.toList());
}
public List<Player> getSpectators() {
return Spectator.stream().filter(Objects::nonNull).map(playerList::get).filter(Objects::nonNull).collect(Collectors.toList());
return Players.keySet().stream()
.filter(s -> Players.get(s) == Type.SPECTATOR)
.map(Bukkit::getPlayer)
.filter(Objects::nonNull)
.collect(Collectors.toList());
}
public List<Player> getPlayers() {
return playerList.values().stream().filter(Objects::nonNull).collect(Collectors.toList());
return Players.keySet().stream()
.map(Bukkit::getPlayer)
.filter(Objects::nonNull)
.collect(Collectors.toList());
}
public Player getFirstSeeker() {
if(initialSeeker == null) return null;
return Bukkit.getPlayer(initialSeeker);
}
public Player getPlayer(UUID uuid) {
return playerList.get(uuid.toString());
if(!Players.containsKey(uuid)) {
return null;
}
return Bukkit.getPlayer(uuid);
}
public void addHider(Player player) {
Hider.add(player.getUniqueId().toString());
Seeker.remove(player.getUniqueId().toString());
Spectator.remove(player.getUniqueId().toString());
playerList.put(player.getUniqueId().toString(), player);
Players.put(player.getUniqueId(), Type.HIDER);
}
public void addSeeker(Player player) {
Hider.remove(player.getUniqueId().toString());
Seeker.add(player.getUniqueId().toString());
Spectator.remove(player.getUniqueId().toString());
playerList.put(player.getUniqueId().toString(), player);
if(initialSeeker == null) {
initialSeeker = player.getUniqueId();
}
Players.put(player.getUniqueId(), Type.SEEKER);
}
public void addSpectator(Player player) {
Hider.remove(player.getUniqueId().toString());
Seeker.remove(player.getUniqueId().toString());
Spectator.add(player.getUniqueId().toString());
playerList.put(player.getUniqueId().toString(), player);
Players.put(player.getUniqueId(), Type.SPECTATOR);
}
public void remove(Player player) {
Hider.remove(player.getUniqueId().toString());
Seeker.remove(player.getUniqueId().toString());
Spectator.remove(player.getUniqueId().toString());
playerList.remove(player.getUniqueId().toString());
Players.remove(player.getUniqueId());
}
public boolean onSameTeam(Player player1, Player player2) {
if (Hider.contains(player1.getUniqueId().toString()) && Hider.contains(player2.getUniqueId().toString())) return true;
else if (Seeker.contains(player1.getUniqueId().toString()) && Seeker.contains(player2.getUniqueId().toString())) return true;
else return Spectator.contains(player1.getUniqueId().toString()) && Spectator.contains(player2.getUniqueId().toString());
return Players.get(player1.getUniqueId()) == Players.get(player2.getUniqueId());
}
public void reload() {
Hider.clear();
Seeker.clear();
Spectator.clear();
Players.replaceAll((u, v) -> Type.HIDER);
hider_kills.clear();
seeker_kills.clear();
hider_deaths.clear();
@ -148,47 +148,38 @@ public class Board {
}
public void addKill(UUID uuid) {
if (Hider.contains(uuid.toString())) {
if (hider_kills.containsKey(uuid.toString())) {
hider_kills.put(uuid.toString(), hider_kills.get(uuid.toString())+1);
} else {
hider_kills.put(uuid.toString(), 1);
}
} else if (Seeker.contains(uuid.toString())) {
if (seeker_kills.containsKey(uuid.toString())) {
seeker_kills.put(uuid.toString(), seeker_kills.get(uuid.toString())+1);
} else {
seeker_kills.put(uuid.toString(), 1);
}
if(Players.get(uuid) == Type.HIDER) {
int kills = hider_kills.getOrDefault(uuid, 0);
hider_kills.put(uuid, kills + 1);
} else if(Players.get(uuid) == Type.SEEKER) {
int kills = seeker_kills.getOrDefault(uuid, 0);
seeker_kills.put(uuid, kills + 1);
}
}
public void addDeath(UUID uuid) {
if (Hider.contains(uuid.toString())) {
if (hider_deaths.containsKey(uuid.toString())) {
hider_deaths.put(uuid.toString(), hider_deaths.get(uuid.toString())+1);
} else {
hider_deaths.put(uuid.toString(), 1);
}
} else if (Seeker.contains(uuid.toString())) {
if (seeker_deaths.containsKey(uuid.toString())) {
seeker_deaths.put(uuid.toString(), seeker_deaths.get(uuid.toString())+1);
} else {
seeker_deaths.put(uuid.toString(), 1);
}
if(Players.get(uuid) == Type.HIDER) {
int kills = hider_deaths.getOrDefault(uuid, 0);
hider_deaths.put(uuid, kills + 1);
} else if(Players.get(uuid) == Type.SEEKER) {
int kills = seeker_deaths.getOrDefault(uuid, 0);
seeker_deaths.put(uuid, kills + 1);
}
}
public Map<String, Integer> getHiderKills() {
public Map<UUID, Integer> getHiderKills() {
return new HashMap<>(hider_kills);
}
public Map<String, Integer> getSeekerKills() {
public Map<UUID, Integer> getSeekerKills() {
return new HashMap<>(seeker_kills);
}
public Map<String, Integer> getHiderDeaths() {
public Map<UUID, Integer> getHiderDeaths() {
return new HashMap<>(hider_deaths);
}
public Map<String, Integer> getSeekerDeaths() {
public Map<UUID, Integer> getSeekerDeaths() {
return new HashMap<>(seeker_deaths);
}
@ -197,7 +188,7 @@ public class Board {
}
private void createLobbyBoard(Player player, boolean recreate) {
CustomBoard board = customBoards.get(player.getUniqueId().toString());
CustomBoard board = customBoards.get(player.getUniqueId());
if (recreate || board == null) {
board = new CustomBoard(player, LOBBY_TITLE);
board.updateTeams();
@ -228,7 +219,7 @@ public class Board {
i++;
}
board.display();
customBoards.put(player.getUniqueId().toString(), board);
customBoards.put(player.getUniqueId(), board);
}
public String getMapName() {
@ -242,7 +233,7 @@ public class Board {
}
private void createGameBoard(Player player, boolean recreate) {
CustomBoard board = customBoards.get(player.getUniqueId().toString());
CustomBoard board = customBoards.get(player.getUniqueId());
if (recreate || board == null) {
board = new CustomBoard(player, GAME_TITLE);
board.updateTeams();
@ -279,7 +270,7 @@ public class Board {
if (!tauntEnabled) continue;
if (taunt == null || status == Status.STARTING) {
board.setLine(String.valueOf(i), line.replace("{TAUNT}", TAUNT_COUNTING.replace("{AMOUNT}", "0")));
} else if (!tauntLast && Hider.size() == 1) {
} else if (!tauntLast && sizeHider() == 1) {
board.setLine(String.valueOf(i), line.replace("{TAUNT}", TAUNT_EXPIRED));
} else if (!taunt.isRunning()) {
board.setLine(String.valueOf(i), line.replace("{TAUNT}", TAUNT_COUNTING.replaceFirst("\\{AMOUNT}", taunt.getDelay() / 60 + "").replaceFirst("\\{AMOUNT}", taunt.getDelay() % 60 + "")));
@ -306,23 +297,23 @@ public class Board {
i++;
}
board.display();
customBoards.put(player.getUniqueId().toString(), board);
customBoards.put(player.getUniqueId(), board);
}
public void removeBoard(Player player) {
ScoreboardManager manager = Bukkit.getScoreboardManager();
assert manager != null;
player.setScoreboard(manager.getMainScoreboard());
customBoards.remove(player.getUniqueId().toString());
customBoards.remove(player.getUniqueId());
}
public void reloadLobbyBoards() {
for(Player player : playerList.values())
for(Player player : getPlayers())
createLobbyBoard(player, false);
}
public void reloadGameBoards() {
for(Player player : playerList.values())
for(Player player : getPlayers())
createGameBoard(player, false);
}
@ -332,17 +323,19 @@ public class Board {
}
private String getSeekerPercent() {
if (playerList.values().size() < 2)
int size = size();
if (size < 2)
return " --";
else
return " "+(int)(100*(1.0/playerList.size()));
return " "+(int)(100*(1.0/size));
}
private String getHiderPercent() {
if (playerList.size() < 2)
int size = size();
if (size < 2)
return " --";
else
return " "+(int)(100-100*(1.0/playerList.size()));
return " "+(int)(100-100*(1.0/size));
}
private String getTeam(Player player) {
@ -353,10 +346,8 @@ public class Board {
}
public void cleanup() {
playerList.clear();
Hider.clear();
Seeker.clear();
Spectator.clear();
Players.clear();;
initialSeeker = null;
customBoards.clear();
}

View file

@ -0,0 +1,48 @@
package net.tylermurphy.hideAndSeek.game.listener;
import net.tylermurphy.hideAndSeek.Main;
import net.tylermurphy.hideAndSeek.game.Board;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.entity.EntityBreakDoorEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
public class WorldInteractHandler implements Listener {
@EventHandler(priority = EventPriority.HIGHEST)
public void onBlockBreak(BlockBreakEvent event) {
Player player = event.getPlayer();
Board board = Main.getInstance().getBoard();
if(board.contains(player)) {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onHangingEntityBreakByEntity(HangingBreakByEntityEvent event) {
if (!(event.getRemover() instanceof Player)) {
return;
}
Player player = (Player) event.getRemover();
Board board = Main.getInstance().getBoard();
if(board.contains(player)) {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onBreakDoor(EntityBreakDoorEvent event) {
if (!(event.getEntity() instanceof Player)) {
return;
}
Player player = (Player) event.getEntity();
Board board = Main.getInstance().getBoard();
if(board.contains(player)) {
event.setCancelled(true);
}
}
}

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.game.util;
public enum Status {

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.game.util;
public enum WinType {

View file

@ -134,4 +134,12 @@ public class Location {
return destination.isDirectory();
}
public boolean isNotSetup() {
return getBlockX() == 0 && getBlockY() == 0 && getBlockZ() == 0;
}
public boolean isNotInBounds(int xmin, int xmax, int zmin, int zmax) {
return getBlockX() < xmin || getBlockX() > xmax || getBlockZ() < zmin || getBlockZ() > zmax;
}
}

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.world;
import org.bukkit.Location;

View file

@ -1,22 +1,3 @@
/*
* This file is part of Kenshins Hide and Seek
*
* Copyright (c) 2021 Tyler Murphy.
*
* Kenshins Hide and Seek free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* he Free Software Foundation version 3.
*
* Kenshins Hide and Seek is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package net.tylermurphy.hideAndSeek.world;
import net.tylermurphy.hideAndSeek.Main;

View file

@ -268,11 +268,8 @@ locale: "en-US"
# playing the game.
blockedCommands: [
"msg",
"tp",
"gamemode",
"kill",
"give",
"effect"
"reply",
"me"
]
# Stop interactions with any block by any user while playing the game.

View file

@ -10,6 +10,7 @@ Localization:
COMMAND_PLAYER_ONLY: "Dieser Befehl kann nur als Spieler ausgeführt werden."
COMMAND_NOT_ALLOWED: "Es ist dir nicht gestattet diesen Befehl auszuführen."
COMMAND_ERROR: "Ein unbekannter Fehler ist aufgetreten."
COMMAND_INVALID_ARG: "Ungültiges Argument: {AMOUNT}"
GAME_PLAYER_DEATH: "&c{PLAYER}&f ist gestorben."
GAME_PLAYER_FOUND: "&e{PLAYER}&f wurde gefunden und ist nun ein Seeker."
GAME_PLAYER_FOUND_BY: "&e{PLAYER}&f wurde von &c{PLAYER}&f gefunden und ist nun ein Seeker."
@ -17,7 +18,7 @@ Localization:
GAME_GAMEOVER_SEEKERS_QUIT: "All Seeker haben das Spiel verlassen."
GAME_GAMEOVER_HIDERS_QUIT: "All Hider haben das Spiel verlassen."
GAME_GAMEOVER_TIME: "Seekers haben keine Spielzeit mehr. Die Hiders haben gewonnen!"
GAME_SETUP: "Spiel wurde noch nicht eingerichtet. Führe &c/hs setup&f aus, um die Einrichtungsschritte zu sehen."
GAME_SETUP: "Es gibt keine Setup-Karten! Führen Sie /hs map status auf einer Karte aus, um zu sehen, was Sie tun müssen."
GAME_INGAME: "Du bist bereits in der Lobby oder im Spiel."
GAME_NOT_INGAME: "Du bist weder in einer Lobby noch in einem Spiel."
GAME_INPROGRESS: "Es läuft bereits ein Spiel."
@ -25,6 +26,7 @@ Localization:
GAME_JOIN: "{PLAYER} hat die Hide and Seek Lobby betreten."
GAME_JOIN_SPECTATOR: "Du bist als Beobachter einem laufenden Spiel beigetreten."
GAME_LEAVE: "{PLAYER} hat die Hide and Seek Lobby verlassen."
LOBBY_IN_USE: "Die Lobby kann nicht verändert werden, solange die Lobby nicht leer ist."
CONFIG_RELOAD: "Konfiguration neu geladen."
MAPSAVE_INPROGRESS: "Weltkarte wird aktuell gespeichert. Versuche es später nochmal."
MAPSAVE_START: "Starte Speichervorgang der Weltkarte"
@ -32,6 +34,9 @@ Localization:
MAPSAVE_END: "Speichervorgang abgeschlossen."
MAPSAVE_ERROR: "Aktuelle Weltkarte konnte nicht gefunden werden."
MAPSAVE_DISABLED: "Mapsave ist in config.yml deaktiviert."
MAPSAVE_FAIL_WORLD: "Mapsave fehlgeschlagen. Die aktuelle Welt konnte nicht geladen werden."
MAPSAVE_INVALID: "Ungültige Welt zum Speichern: {AMOUNT}"
MAPSAVE_FAIL_DIR: "Verzeichnis konnte nicht umbenannt werden: {AMOUNT}"
WORLDBORDER_DISABLE: "World Border ausgeschaltet."
WORLDBORDER_INVALID_INPUT: "Ungültiger Wert: {AMOUNT}"
WORLDBORDER_MIN_SIZE: "World Border darf nicht geringer als 100 Blöcke sein."
@ -39,24 +44,32 @@ Localization:
WORLDBORDER_ENABLE: "Setze World Border zentriert von dieser Position aus. Größe: {AMOUNT}. Verzögerung: {AMOUNT}."
WORLDBORDER_DECREASING: "World Norder schrumpoft 100 Blöcke über die nächsten 30 Sekunden!"
WORLDBORDER_WARN: "Die Weltgrenze wird in den nächsten 30er Jahren schrumpfen!"
WORLDBORDER_CHANGE_SIZE: "Die Änderung der Weltgrenze kann nicht 0 oder weniger sein."
TAUNTED: "&c&oOh nein! Du wurdest geärgert!"
TAUNT: "Ein zufälliger Hider wird in den nächsten 30 Sekunden geärgert."
TAUNT_ACTIVATE: "Ärgern wurde aktiviert"
ERROR_GAME_SPAWN: "Bitte erst die Spawn-Position für das Spiel festlegen."
ERROR_GAME_SEEKER_SPAWN: "Bitte setze zuerst den Sucher-Spawn-Ort"
ERROR_MAP_BOUNDS: "Bitte setzen Sie die Grenzen der Karte vor dem Speichern"
WARN_MAP_BOUNDS: "Dieser Ort liegt nicht innerhalb der Kartengrenzen, dies könnte Probleme verursachen"
WARN_SPAWN_RESET: "Spiel-Spawn wurde zurückgesetzt, da er nicht innerhalb der Kartengrenzen liegt"
WARN_SEEKER_SPAWN_RESET: "Seeker-Spawn zurückgesetzt, da er nicht innerhalb der Kartengrenzen liegt"
SETUP: "&f&lFühre die folgenden Schritte zur Einrichtung aus:"
SETUP_GAME: "&c&l- &fTeleport-Position für den Spielbeginn festlegen mit /hs setspawn"
SETUP_LOBBY: "&c&l- &fTeleport-Position für die Lobby festlegen mit /hs setlobby"
SETUP_SEEKER_LOBBY: "&c&l- &fTeleport-Position für die Lobby Seekern festlegen mit /hs setseekerlobby"
SETUP_EXIT: "&c&l- &fTeleport-Position für das Spielende festlegen mit /hs setexit"
SETUP_SAVEMAP: "&c&l- &fHide and Seek Weltkarte speichern mit /hs savemap (nach /hs setspawn)"
SETUP_GAME: "&c&l- &fSpielspawn ist nicht gesetzt, /hs map set spawn <map>"
SETUP_LOBBY: "&c&l- &fLobby-Spawn ist nicht gesetzt, /hs map set lobby <map>"
SETUP_SEEKER_LOBBY: "&c&l- &fSucherlobby-Spawn ist nicht gesetzt, /hs map set seekerlobby <map>"
SETUP_EXIT: "&c&l- &fBeenden/Verlassen der Teleportposition ist nicht festgelegt, /hs setexit"
SETUP_SAVEMAP: "&c&l- &fVerstecken und Suchen Karte wird nicht gespeichert, /hs map save <map>"
SETUP_COMPLETE: "Alles eingerichtet! Hide and Seek ist spielbereit."
SETUP_BOUNDS: "&c&l- &fSpielgrenze in 2 gegenüberliegenden Ecken der Welt festlegen mit /hs setbounds"
SETUP_BLOCKHUNT: "&c&l - &fWenn Blockhunt aktiviert ist, muss mindestens 1 Block gesetzt sein, /hs map blockhunt block add block <map> <block>"
SETUP_BOUNDS: "&c&l- &fBitte setzen Sie Spielgrenzen in 2 gegenüberliegenden Ecken der Spielkarte, /hs map set bounds <map>"
GAME_SPAWN: "Teleport-Position für Spielbeginn festgelegt"
LOBBY_SPAWN: "Teleport-Position für Lobby festgelegt"
EXIT_SPAWN: "Teleport-Position für Spielende festgelegt"
SEEKER_SPAWN: "Teleport-Position für Seeker Lobby festgelegt"
START_MIN_PLAYERS: "Um das Spiel zu starten benötigst du mindestens {AMOUNT} Spieler."
START_INVALID_NAME: "Ungültiger Spieler: {PLAYER}."
START_FAILED_SEEKER: "Zufälliger Sucher konnte nicht ausgewählt werden."
START_COUNTDOWN: "Die Hider haben {AMOUNT} Sekunden Zeit sich zu verstecken!"
START_COUNTDOWN_LAST: "Die Hider haben {AMOUNT} Sekunde Zeit sich zu verstecken!"
START: "Los, Seeker! Es ist Zeit, die Hider zu finden."
@ -76,7 +89,44 @@ Localization:
FLYING_ENABLED: "Fliegen aktiviert"
FLYING_DISABLED: "Fliegen deaktiviert"
RESPAWN_NOTICE: "Du wirst in {AMOUNT} Sekunden respawnen."
INVALID_MAP: "Das ist ein ungültiger Kartenname!"
MAP_ALREADY_EXISTS: "Diese Karte existiert bereits!"
INVALID_MAP_NAME: "Der Name darf nur Zahlen oder Buchstaben enthalten."
MAP_CREATED: "Neue Karte erstellt: {AMOUNT}"
MAP_FAIL_DELETE: "Karte konnte nicht gelöscht werden: {AMOUNT}"
MAP_DELETED: "Gelöschte Landkarte: {AMOUNT}"
NO_MAPS: "Es gibt keine Karten im Plugin (/hs map add <name>)"
MAP_NOT_SETUP: "Die Karte {AMOUNT} ist nicht eingerichtet (/hs map status <map>)"
LIST_MAPS: "Die aktuellen Karten sind:"
ARGUMENT_COUNT: "Dieser Befehl erfordert mehr Argumente zur Ausführung."
GAME_SPAWN_NEEDED: "Der Hauptspawn muss vor dem Sucherspawn gesetzt werden."
SEEKER_LOBBY_SPAWN_RESET: "Der Spawn der Seeker-Lobby wurde zurückgesetzt, da der Spiel-Spawn in eine neue Welt verschoben wurde."
SEEKER_LOBBY_INVALID: "Die Lobby des Suchers muss sich in der gleichen Welt befinden, in der das Spiel startet."
CONFIG_ERROR: "Fehler beim Neuladen der Konfiguration. Prüfen Sie die Serverprotokolle."
BLOCKHUNT_DISABLED: "Bitte aktivieren Sie Blockhunt in dieser Karte in der maps.yml, um Verkleidungen zu ermöglichen. Blockhunt funktioniert nicht auf 1.8"
BLOCKHUNT_UNSUPPORTED: "Blockhunt funktioniert nicht unter 1.8"
BLOCKHUNT_SET_TO: "Blockjagd eingestellt auf {AMOUNT}."
BLOCKHUNT_BLOCK_EXISTS: "{AMOUNT} ist bereits in der Blockhunt-Konfiguration eingestellt."
BLOCKHUNT_BLOCK_DOESNT_EXIT: "{AMOUNT} ist bereits nicht in der blochunt-Konfiguration eingestellt."
BLOCKHUNT_BLOCK_ADDED: "{AMOUNT} zur Blockhunt-Konfiguration hinzugefügt."
BLOCKHUNT_BLOCK_REMOVED: "Entfernt {AMOUNT} aus der Blockhunt-Konfiguration."
BLOCKHUNT_LIST_BLOCKS: "Die folgenden Blockhunt-Blöcke sind:"
NO_BLOCKS: "Auf dieser Karte gibt es keine Blockhunt-Blöcke."
WORLD_EXISTS: "Eine Welt namens {AMOUNT} existiert bereits."
WORLD_DOESNT_EXIST: "Es gibt keine Welt namens {AMOUNT}, die existiert."
WORLD_ADDED: "Eine Welt mit dem Namen {AMOUNT} erstellt."
WORLD_ADDED_FAILED: "Fehlgeschlagen, eine neue Welt zu erschaffen."
WORLD_REMOVED: "Eine Welt namens {AMOUNT} wurde gelöscht."
WORLD_REMOVED_FAILED: "Welt konnte nicht gelöscht werden."
WORLD_NOT_EMPTY: "In einer zu löschenden Welt darf es keine Spieler geben."
LIST_WORLDS: "Die folgenden Welten sind:"
NO_WORLDS: "Failed to fetch any worlds."
WORLD_LOAD_FAILED: "Es konnten keine Welten geholt werden."
INVALID_WORLD_TYPE: "Ungültiger Welttyp: {AMOUNT}."
NO_CONFIRMATION: "Sie haben nichts zu bestätigen."
CONFIRMATION_TIMED_OUT: "Die Zeit für die Bestätigung ist abgelaufen."
CONFIRMATION: "Führen Sie /hs confirm innerhalb von 10s aus, um zu bestätigen."
# DO NOT EDIT IT OR IT MAY BREAK OR RESET FILE
version: 3
version: 4
type: "de-DE"

View file

@ -49,7 +49,11 @@ Localization:
TAUNT: "A random hider will be taunted in the next 30s."
TAUNT_ACTIVATE: "Taunt has been activated."
ERROR_GAME_SPAWN: "Please set game spawn location first"
ERROR_GAME_SEEKER_SPAWN: "Please set seeker spawn location first"
ERROR_MAP_BOUNDS: "Please set map bounds before saving"
WARN_MAP_BOUNDS: "This location is not inside map bounds, this could cause issues"
WARN_SPAWN_RESET: "Game spawn reset due to not being inside map bounds"
WARN_SEEKER_SPAWN_RESET: "Seeker spawn reset due to not being inside map bounds"
SETUP: "&f&lThe following is needed for setup..."
SETUP_GAME: "&c&l- &fGame spawn isn't set, /hs map set spawn <map>"
SETUP_LOBBY: "&c&l- &fLobby spawn isn't set, /hs map set lobby <map>"
@ -100,6 +104,7 @@ Localization:
SEEKER_LOBBY_INVALID: "Seeker lobby must be in the same world as game spawn."
CONFIG_ERROR: "Error reloading config. Check server logs."
BLOCKHUNT_DISABLED: "Please enable blockhunt in this map inside maps.yml to enable disguises. Blockhunt does not work on 1.8"
BLOCKHUNT_UNSUPPORTED: "Blockhunt does not work on 1.8"
BLOCKHUNT_SET_TO: "Blockhunt set to {AMOUNT}."
BLOCKHUNT_BLOCK_EXISTS: "{AMOUNT} is already set in the blockhunt config."
BLOCKHUNT_BLOCK_DOESNT_EXIT: "{AMOUNT} is already not set in the blochunt config."