Merge branch 'master' into coreHider
Dieser Commit ist enthalten in:
Commit
a4ace2b7af
@ -53,7 +53,7 @@ public class CraftbukkitWrapper19 implements CraftbukkitWrapper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float headRotation(Entity e) {
|
public float headRotation(Entity e) {
|
||||||
return ((CraftEntity)e).getHandle().ch();
|
return ((CraftEntity)e).getHandle().cg();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -78,7 +78,6 @@ public class FightSystem extends JavaPlugin {
|
|||||||
new DenyInventoryMovement();
|
new DenyInventoryMovement();
|
||||||
new EventJoin();
|
new EventJoin();
|
||||||
new Recording();
|
new Recording();
|
||||||
//new ResourcePack();
|
|
||||||
new Check();
|
new Check();
|
||||||
new Shutdown();
|
new Shutdown();
|
||||||
new SetupQuit();
|
new SetupQuit();
|
||||||
|
@ -145,7 +145,6 @@ NO_FRIENDLY_FIRE=§cNo friendly fire allowed
|
|||||||
NO_TNT_PLACE=§cYou are not allowed to place tnt
|
NO_TNT_PLACE=§cYou are not allowed to place tnt
|
||||||
NO_TELEPORT=§cYou are not allowed to use this teleport function
|
NO_TELEPORT=§cYou are not allowed to use this teleport function
|
||||||
OPEN_INVENTORY_TO_CUSTOMIZE=§eOpen inventory to customize your kit
|
OPEN_INVENTORY_TO_CUSTOMIZE=§eOpen inventory to customize your kit
|
||||||
RESOURCEPACK_REQUIRED=§cYou can only join on the event server with the SteamWar resourcepack\n§cPlease allow the use of server resourcepacks in the server list!
|
|
||||||
NO_ENTERN=§cYou may not board
|
NO_ENTERN=§cYou may not board
|
||||||
NO_TEAMAREA=§cYou are not allowed in the team area
|
NO_TEAMAREA=§cYou are not allowed in the team area
|
||||||
TEST_BECOME_LEADER=§7Become a team leader with §8/§eleader
|
TEST_BECOME_LEADER=§7Become a team leader with §8/§eleader
|
||||||
|
@ -142,7 +142,6 @@ NO_FRIENDLY_FIRE=§cDu darfst deinen Teamkollegen keinen Schaden zufügen
|
|||||||
NO_TNT_PLACE=§cDu darfst kein TNT setzen
|
NO_TNT_PLACE=§cDu darfst kein TNT setzen
|
||||||
NO_TELEPORT=§cDu darfst diese Teleportfunktion nicht benutzen
|
NO_TELEPORT=§cDu darfst diese Teleportfunktion nicht benutzen
|
||||||
OPEN_INVENTORY_TO_CUSTOMIZE=§eInventar zum Anpassen des Kits öffnen
|
OPEN_INVENTORY_TO_CUSTOMIZE=§eInventar zum Anpassen des Kits öffnen
|
||||||
RESOURCEPACK_REQUIRED=§cAuf Eventserver kann nur mit dem SteamWar-Resourcepack beigetreten werden\n§cDa du abgelehnt hast, musst du nun in der Serverliste erst einmal wieder Ressourcenpakete von SteamWar aktivieren
|
|
||||||
NO_ENTERN=§cDu darfst nicht entern
|
NO_ENTERN=§cDu darfst nicht entern
|
||||||
NO_TEAMAREA=§cDu darfst nicht zu den Teams
|
NO_TEAMAREA=§cDu darfst nicht zu den Teams
|
||||||
TEST_BECOME_LEADER=§7Werde zum Teamleader mit §8/§eleader
|
TEST_BECOME_LEADER=§7Werde zum Teamleader mit §8/§eleader
|
||||||
|
@ -43,8 +43,8 @@ public class HellsBells {
|
|||||||
|
|
||||||
public static final Random random = new Random();
|
public static final Random random = new Random();
|
||||||
|
|
||||||
private final int xLength = Config.RedExtendRegion.getMaxX() - Config.RedExtendRegion.getMinX();
|
private final int xLength = Config.BlueExtendRegion.getSizeX();
|
||||||
private final int zLength = Config.RedExtendRegion.getMaxZ() - Config.RedExtendRegion.getMinZ();
|
private final int zLength = Config.BlueExtendRegion.getSizeZ();
|
||||||
private State current = State.PRE;
|
private State current = State.PRE;
|
||||||
private int currentDrops = 0;
|
private int currentDrops = 0;
|
||||||
private HellsBellsCountdown currentCountdown;
|
private HellsBellsCountdown currentCountdown;
|
||||||
@ -113,7 +113,7 @@ public class HellsBells {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getStart(int regionSize, int length) {
|
private int getStart(int regionSize, int length) {
|
||||||
double randomNumber = (random.nextDouble() - random.nextDouble()) / 2 + 0.5;
|
double randomNumber = (Math.max(Math.min(random.nextGaussian(), -2), 2) + 2) / 4;
|
||||||
Bukkit.getLogger().log(Level.INFO, "Calculated Start: " + (int) (randomNumber * (regionSize - length)));
|
Bukkit.getLogger().log(Level.INFO, "Calculated Start: " + (int) (randomNumber * (regionSize - length)));
|
||||||
return Math.max(Math.min((int) (randomNumber * (regionSize - length)), regionSize - length), 0);
|
return Math.max(Math.min((int) (randomNumber * (regionSize - length)), regionSize - length), 0);
|
||||||
}
|
}
|
||||||
@ -126,6 +126,8 @@ public class HellsBells {
|
|||||||
new StateDependent(Winconditions.HELLS_BELLS, FightState.Running) {
|
new StateDependent(Winconditions.HELLS_BELLS, FightState.Running) {
|
||||||
@Override
|
@Override
|
||||||
public void enable() {
|
public void enable() {
|
||||||
|
current = State.PRE;
|
||||||
|
currentDrops = 0;
|
||||||
startCountdown();
|
startCountdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
package de.steamwar.fightsystem.listener;
|
|
||||||
|
|
||||||
import de.steamwar.fightsystem.ArenaMode;
|
|
||||||
import de.steamwar.fightsystem.FightSystem;
|
|
||||||
import de.steamwar.fightsystem.states.FightState;
|
|
||||||
import de.steamwar.fightsystem.states.StateDependentListener;
|
|
||||||
import de.steamwar.fightsystem.utils.CraftbukkitWrapper;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
|
||||||
import org.bukkit.event.player.PlayerResourcePackStatusEvent;
|
|
||||||
|
|
||||||
public class ResourcePack implements Listener {
|
|
||||||
|
|
||||||
public ResourcePack(){
|
|
||||||
new StateDependentListener(ArenaMode.Event, FightState.All, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void handlePlayerJoin(PlayerJoinEvent event) {
|
|
||||||
Player player = event.getPlayer();
|
|
||||||
CraftbukkitWrapper.impl.sendResourcePack(player, "https://steamwar.de/antixray.zip", "3e94f5abeb07cc95067b27705615ec14666abe7b");
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void onResourcepack(PlayerResourcePackStatusEvent e){
|
|
||||||
if(e.getStatus() == PlayerResourcePackStatusEvent.Status.ACCEPTED || e.getStatus() == PlayerResourcePackStatusEvent.Status.SUCCESSFULLY_LOADED)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Player player = e.getPlayer();
|
|
||||||
FightSystem.getMessage().sendPrefixless("RESOURCEPACK_REQUIRED", player);
|
|
||||||
player.kickPlayer(null);
|
|
||||||
}
|
|
||||||
}
|
|
In neuem Issue referenzieren
Einen Benutzer sperren