diff options
author | Tyler Murphy <tylermurphy534@gmail.com> | 2021-12-27 13:01:39 -0600 |
---|---|---|
committer | Tyler Murphy <tylermurphy534@gmail.com> | 2021-12-27 13:01:39 -0600 |
commit | 7f9def05fb88441520bd95f0d5cf20f7162b72dd (patch) | |
tree | 8244125b9788cbe52c813266c93a69e8e1c8cd37 /src/main/java/net/tylermurphy/hideAndSeek/game | |
parent | 1.3.3 beta 3 (diff) | |
download | kenshinshideandseek-7f9def05fb88441520bd95f0d5cf20f7162b72dd.tar.gz kenshinshideandseek-7f9def05fb88441520bd95f0d5cf20f7162b72dd.tar.bz2 kenshinshideandseek-7f9def05fb88441520bd95f0d5cf20f7162b72dd.zip |
fix ClassNotFound and add Licence headers
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/game')
4 files changed, 90 insertions, 10 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/game/Board.java b/src/main/java/net/tylermurphy/hideAndSeek/game/Board.java index 44e3f05..9df39be 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/game/Board.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/game/Board.java @@ -1,3 +1,22 @@ +/* + * 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, either version 3 of the License. + * + * 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 static net.tylermurphy.hideAndSeek.configuration.Config.*; diff --git a/src/main/java/net/tylermurphy/hideAndSeek/game/CommandHandler.java b/src/main/java/net/tylermurphy/hideAndSeek/game/CommandHandler.java index 6758908..7ff7c74 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/game/CommandHandler.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/game/CommandHandler.java @@ -1,3 +1,22 @@ +/* + * 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, either version 3 of the License. + * + * 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 static net.tylermurphy.hideAndSeek.configuration.Config.*; diff --git a/src/main/java/net/tylermurphy/hideAndSeek/game/EventListener.java b/src/main/java/net/tylermurphy/hideAndSeek/game/EventListener.java index dc79732..4dba35a 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/game/EventListener.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/game/EventListener.java @@ -1,3 +1,22 @@ +/* + * 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, either version 3 of the License. + * + * 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 static net.tylermurphy.hideAndSeek.configuration.Config.*; diff --git a/src/main/java/net/tylermurphy/hideAndSeek/game/Game.java b/src/main/java/net/tylermurphy/hideAndSeek/game/Game.java index d04d32a..6ee4cf6 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/game/Game.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/game/Game.java @@ -1,3 +1,22 @@ +/* + * This file is part of Kenshins Hide and Seek + * + * Copyright (c) 2020-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, either version 3 of the License. + * + * 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 static net.tylermurphy.hideAndSeek.configuration.Config.*; @@ -33,7 +52,7 @@ public class Game { public static Taunt taunt; public static Glow glow; - public static WorldBorder worldBorder; + public static Border worldBorder; public static WorldLoader worldLoader; public static int tick = 0; public static int countdownTime = -1; @@ -77,10 +96,16 @@ public class Game { player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED,1000000,5,false,false)); player.sendTitle(ChatColor.GOLD + "" + ChatColor.BOLD + "HIDER", ChatColor.WHITE + message("HIDERS_SUBTITLE").toString(), 10, 70, 20); } + if(tauntEnabled) + taunt = new Taunt(); + if (glowEnabled) + glow = new Glow(); + worldBorder = new Border(); worldBorder.resetWorldborder("hideandseek_"+spawnWorld); - for(Player player : Board.getPlayers()){ + if(gameLength > 0) + timeLeft = gameLength; + for(Player player : Board.getPlayers()) Board.createGameBoard(player); - } Board.reloadGameBoards(); status = Status.STARTING; int temp = gameId; @@ -93,12 +118,8 @@ public class Game { sendDelayedMessage(messagePrefix + message("START_COUNTDOWN").addAmount(1), gameId, 20 * 29); Bukkit.getServer().getScheduler().runTaskLater(Main.plugin, () -> { if(temp != gameId) return; - if(gameLength > 0) timeLeft = gameLength; broadcastMessage(messagePrefix + message("START")); for(Player player : Board.getPlayers()) resetPlayer(player); - if(worldborderEnabled) worldBorder = new WorldBorder(); - if(tauntEnabled) taunt = new Taunt(); - if (glowEnabled) glow = new Glow(); status = Status.PLAYING; }, 20 * 30); } @@ -432,17 +453,19 @@ class Taunt { } -class WorldBorder { +class Border { private int delay; private boolean running; - public WorldBorder() { + public Border() { delay = 60 * worldborderDelay; } void update(){ - if(delay == 0){ + if(delay == 30 && !running){ + broadcastMessage(worldborderPrefix + message("WORLDBORDER_WARN")); + } else if(delay == 0){ if(running){ delay = 60 * worldborderDelay; running = false; |