Modif de truc

This commit is contained in:
Maxlego08 2020-05-03 14:56:29 +02:00
parent 3901728633
commit 0b3f2ad906
3 changed files with 16 additions and 22 deletions

View File

@ -1,6 +1,6 @@
name: zKoth
author: Maxlego08
main: fr.maxlego08.koth.ZKoth
version: 1.0.0.7
version: 1.0.0.8
softdepend: [PlaceholderAPI]
commands:

View File

@ -257,7 +257,12 @@ public class Koth extends ZUtils {
private transient TimerTask task;
public void startCap(Player player, FactionListener listener) {
/**
*
* @param player
* @param listener
*/
public synchronized void startCap(Player player, FactionListener listener) {
if (hasPlayer)
return;
@ -297,6 +302,13 @@ public class Koth extends ZUtils {
int tmpTimer = timer.getAndDecrement();
if (currentPlayer != null) {
if (!cuboid.contains(currentPlayer.getLocation()))
currentPlayer = null;
}
if (currentPlayer == null) {
if (!hasPlayer) {
@ -359,7 +371,8 @@ public class Koth extends ZUtils {
* @param currentFaction
* @param cooldown
*/
private void broadcast(Message message, Player player, String currentFaction, int cooldown, boolean defaultMessage) {
private void broadcast(Message message, Player player, String currentFaction, int cooldown,
boolean defaultMessage) {
String msg = message.getMessage();
Location location = cuboid.getCenter();

View File

@ -17,27 +17,8 @@ public class SuperiorSkyblock2 implements FactionListener {
private SuperiorSkyblock plugin = SuperiorSkyblockAPI.getSuperiorSkyblock();
private Island getIsland(Player player) {
System.out.println("Plugin - test1 " + plugin);
if (plugin == null)
plugin = SuperiorSkyblockAPI.getSuperiorSkyblock();
System.out.println("Plugin - test2 " + plugin);
System.out.println("Plugin - test3 " + SuperiorSkyblockAPI.getPlayer(player));
if (plugin != null){
System.out.println("Plugin - test4 " + plugin.getGrid());
if (plugin.getGrid() != null)
System.out.println("Plugin - test5 " + plugin.getGrid().getIsland(SuperiorSkyblockAPI.getPlayer(player)));
}
return plugin.getGrid().getIsland(SuperiorSkyblockAPI.getPlayer(player));
}