closes #91 added spec hider #97
18
FightSystem_10/src/de/steamwar/fightsystem/fight/Fight_10.java
Normale Datei
18
FightSystem_10/src/de/steamwar/fightsystem/fight/Fight_10.java
Normale Datei
@ -0,0 +1,18 @@
|
|||||||
|
package de.steamwar.fightsystem.fight;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class Fight_10 {
|
||||||
|
|
||||||
|
private Fight_10() {}
|
||||||
|
|
||||||
|
static void hidePlayer(Player target, Player toHide) {
|
||||||
|
Fight_8.hidePlayer(target, toHide);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void showPlayer(Player target, Player toShow) {
|
||||||
|
Fight_8.showPlayer(target, toShow);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
19
FightSystem_12/src/de/steamwar/fightsystem/fight/Fight_12.java
Normale Datei
19
FightSystem_12/src/de/steamwar/fightsystem/fight/Fight_12.java
Normale Datei
@ -0,0 +1,19 @@
|
|||||||
|
package de.steamwar.fightsystem.fight;
|
||||||
|
|
||||||
|
import de.steamwar.fightsystem.IFightSystem;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class Fight_12 {
|
||||||
|
|
||||||
|
private Fight_12() {}
|
||||||
|
|
||||||
|
static void hidePlayer(Player target, Player toHide) {
|
||||||
|
target.hidePlayer(IFightSystem.getPlugin(), toHide);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void showPlayer(Player target, Player toShow) {
|
||||||
|
target.showPlayer(IFightSystem.getPlugin(), toShow);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
18
FightSystem_14/src/de/steamwar/fightsystem/fight/Fight_14.java
Normale Datei
18
FightSystem_14/src/de/steamwar/fightsystem/fight/Fight_14.java
Normale Datei
@ -0,0 +1,18 @@
|
|||||||
|
package de.steamwar.fightsystem.fight;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class Fight_14 {
|
||||||
|
|
||||||
|
private Fight_14() {}
|
||||||
|
|
||||||
|
static void hidePlayer(Player target, Player toHide) {
|
||||||
|
Fight_12.hidePlayer(target, toHide);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void showPlayer(Player target, Player toShow) {
|
||||||
|
Fight_12.showPlayer(target, toShow);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
18
FightSystem_15/src/de/steamwar/fightsystem/fight/Fight_15.java
Normale Datei
18
FightSystem_15/src/de/steamwar/fightsystem/fight/Fight_15.java
Normale Datei
@ -0,0 +1,18 @@
|
|||||||
|
package de.steamwar.fightsystem.fight;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class Fight_15 {
|
||||||
|
|
||||||
|
private Fight_15() {}
|
||||||
|
|
||||||
|
static void hidePlayer(Player target, Player toHide) {
|
||||||
|
Fight_14.hidePlayer(target, toHide);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void showPlayer(Player target, Player toShow) {
|
||||||
|
Fight_14.showPlayer(target, toShow);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
18
FightSystem_8/src/de/steamwar/fightsystem/fight/Fight_8.java
Normale Datei
18
FightSystem_8/src/de/steamwar/fightsystem/fight/Fight_8.java
Normale Datei
@ -0,0 +1,18 @@
|
|||||||
|
package de.steamwar.fightsystem.fight;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class Fight_8 {
|
||||||
|
|
||||||
|
private Fight_8() {}
|
||||||
|
|
||||||
|
static void hidePlayer(Player target, Player toHide) {
|
||||||
|
target.hidePlayer(toHide);
|
||||||
|
|||||||
|
}
|
||||||
|
|
||||||
|
static void showPlayer(Player target, Player toShow) {
|
||||||
|
target.showPlayer(toShow);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
18
FightSystem_9/src/de/steamwar/fightsystem/fight/Fight_9.java
Normale Datei
18
FightSystem_9/src/de/steamwar/fightsystem/fight/Fight_9.java
Normale Datei
@ -0,0 +1,18 @@
|
|||||||
|
package de.steamwar.fightsystem.fight;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class Fight_9 {
|
||||||
|
|
||||||
|
private Fight_9() {}
|
||||||
|
|
||||||
|
static void hidePlayer(Player target, Player toHide) {
|
||||||
|
Fight_8.hidePlayer(target, toHide);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void showPlayer(Player target, Player toShow) {
|
||||||
|
Fight_8.showPlayer(target, toShow);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package de.steamwar.fightsystem.fight;
|
package de.steamwar.fightsystem.fight;
|
||||||
|
|
||||||
|
import de.steamwar.core.Core;
|
||||||
import de.steamwar.fightsystem.Config;
|
import de.steamwar.fightsystem.Config;
|
||||||
import de.steamwar.fightsystem.FightSystem;
|
import de.steamwar.fightsystem.FightSystem;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -92,8 +93,32 @@ public class Fight {
|
|||||||
if(gameMode == GameMode.SPECTATOR) {
|
if(gameMode == GameMode.SPECTATOR) {
|
||||||
for(Player currentPlayer : Bukkit.getServer().getOnlinePlayers()) {
|
for(Player currentPlayer : Bukkit.getServer().getOnlinePlayers()) {
|
||||||
if(currentPlayer.getUniqueId() != player.getUniqueId() && currentPlayer.getGameMode() == GameMode.SPECTATOR) {
|
if(currentPlayer.getUniqueId() != player.getUniqueId() && currentPlayer.getGameMode() == GameMode.SPECTATOR) {
|
||||||
currentPlayer.hidePlayer(FightSystem.getPlugin(), player);
|
switch (Core.getVersion()) {
|
||||||
Lixfel
hat
Diese Befehle gibts in der 1.8 noch nicht, da gibts nur die Variante ohne Plugin als Argument. Diese Befehle gibts in der 1.8 noch nicht, da gibts nur die Variante ohne Plugin als Argument.
Yaruma3341
hat
gefixt. Habe das für jede Version hinzugefügt, da wir uns mal geeinigt haben, dass wir das so machen absofort, da man sonst vlt nicht weiß welche Version man nutzen soll. Bsp: Habe eine 1.8 und eine 1.12 Klasse aber keine für 1.9-1.10. Jetzt weiß man nicht direkt ob man die 1.8 oder 1.12 nutzen muss für die dazwischenliegenden Versionen. Deshalb habe ich das jetzt so "ausführlich" gemacht gefixt. Habe das für jede Version hinzugefügt, da wir uns mal geeinigt haben, dass wir das so machen absofort, da man sonst vlt nicht weiß welche Version man nutzen soll. Bsp: Habe eine 1.8 und eine 1.12 Klasse aber keine für 1.9-1.10. Jetzt weiß man nicht direkt ob man die 1.8 oder 1.12 nutzen muss für die dazwischenliegenden Versionen. Deshalb habe ich das jetzt so "ausführlich" gemacht
|
|||||||
player.hidePlayer(FightSystem.getPlugin(), currentPlayer);
|
case 8:
|
||||||
|
Fight_8.hidePlayer(currentPlayer, player);
|
||||||
|
Fight_8.hidePlayer(player, currentPlayer);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
Fight_9.hidePlayer(currentPlayer, player);
|
||||||
|
Fight_9.hidePlayer(player, currentPlayer);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
Fight_10.hidePlayer(currentPlayer, player);
|
||||||
|
Fight_10.hidePlayer(player, currentPlayer);
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
Fight_14.hidePlayer(currentPlayer, player);
|
||||||
|
Fight_14.hidePlayer(player, currentPlayer);
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
Fight_15.hidePlayer(currentPlayer, player);
|
||||||
|
Fight_15.hidePlayer(player, currentPlayer);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Fight_12.hidePlayer(currentPlayer, player);
|
||||||
|
Fight_12.hidePlayer(player, currentPlayer);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,8 +126,32 @@ public class Fight {
|
|||||||
if(gameMode == GameMode.SURVIVAL) {
|
if(gameMode == GameMode.SURVIVAL) {
|
||||||
for(Player currentPlayer : Bukkit.getServer().getOnlinePlayers()) {
|
for(Player currentPlayer : Bukkit.getServer().getOnlinePlayers()) {
|
||||||
if(currentPlayer.getUniqueId() != player.getUniqueId() && currentPlayer.getGameMode() == GameMode.SPECTATOR) {
|
if(currentPlayer.getUniqueId() != player.getUniqueId() && currentPlayer.getGameMode() == GameMode.SPECTATOR) {
|
||||||
currentPlayer.showPlayer(FightSystem.getPlugin(), player);
|
switch (Core.getVersion()) {
|
||||||
player.showPlayer(FightSystem.getPlugin(), currentPlayer);
|
case 8:
|
||||||
|
Fight_8.showPlayer(currentPlayer, player);
|
||||||
|
Fight_8.showPlayer(player, currentPlayer);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
Fight_9.showPlayer(currentPlayer, player);
|
||||||
|
Fight_9.showPlayer(player, currentPlayer);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
Fight_10.showPlayer(currentPlayer, player);
|
||||||
|
Fight_10.showPlayer(player, currentPlayer);
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
Fight_14.showPlayer(currentPlayer, player);
|
||||||
|
Fight_14.showPlayer(player, currentPlayer);
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
Fight_15.showPlayer(currentPlayer, player);
|
||||||
|
Fight_15.showPlayer(player, currentPlayer);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Fight_12.showPlayer(currentPlayer, player);
|
||||||
|
Fight_12.showPlayer(player, currentPlayer);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Diese Funktion ist zwar in der 1.15 deprecated, aber immer noch vorhanden. Der Übersicht halber (damit die Codemenge nicht unnötig explodiert) bitte ich dich, diese Funktion überall zu verwenden, d.h. Den versionsabhängigen Code wieder zu entfernen.
done