SteamWar/FightSystem
Archiviert
13
1

CoreHider #357

Zusammengeführt
Lixfel hat 5 Commits von coreHider nach master 2022-08-23 14:31:20 +02:00 zusammengeführt
6 geänderte Dateien mit 6 neuen und 42 gelöschten Zeilen
Nur Änderungen aus Commit a4ace2b7af werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -53,7 +53,7 @@ public class CraftbukkitWrapper19 implements CraftbukkitWrapper {
@Override
public float headRotation(Entity e) {
return ((CraftEntity)e).getHandle().ch();
return ((CraftEntity)e).getHandle().cg();
}
@Override

Datei anzeigen

@ -78,7 +78,6 @@ public class FightSystem extends JavaPlugin {
new DenyInventoryMovement();
new EventJoin();
new Recording();
//new ResourcePack();
new Check();
new Shutdown();
new SetupQuit();

Datei anzeigen

@ -145,7 +145,6 @@ NO_FRIENDLY_FIRE=§cNo friendly fire allowed
NO_TNT_PLACE=§cYou are not allowed to place tnt
NO_TELEPORT=§cYou are not allowed to use this teleport function
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_TEAMAREA=§cYou are not allowed in the team area
TEST_BECOME_LEADER=§7Become a team leader with §8/§eleader

Datei anzeigen

@ -142,7 +142,6 @@ NO_FRIENDLY_FIRE=§cDu darfst deinen Teamkollegen keinen Schaden zufügen
NO_TNT_PLACE=§cDu darfst kein TNT setzen
NO_TELEPORT=§cDu darfst diese Teleportfunktion nicht benutzen
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_TEAMAREA=§cDu darfst nicht zu den Teams
TEST_BECOME_LEADER=§7Werde zum Teamleader mit §8/§eleader

Datei anzeigen

@ -43,8 +43,8 @@ public class HellsBells {
public static final Random random = new Random();
private final int xLength = Config.RedExtendRegion.getMaxX() - Config.RedExtendRegion.getMinX();
private final int zLength = Config.RedExtendRegion.getMaxZ() - Config.RedExtendRegion.getMinZ();
private final int xLength = Config.BlueExtendRegion.getSizeX();
private final int zLength = Config.BlueExtendRegion.getSizeZ();
private State current = State.PRE;
private int currentDrops = 0;
private HellsBellsCountdown currentCountdown;
@ -113,7 +113,7 @@ public class HellsBells {
}
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)));
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) {
@Override
public void enable() {
current = State.PRE;
currentDrops = 0;
startCountdown();
}

Datei anzeigen

@ -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);
}
}