hotfixes
Dieser Commit ist enthalten in:
Ursprung
c8efb3d4ee
Commit
bb88704e7e
2
pom.xml
2
pom.xml
@ -48,7 +48,7 @@
|
||||
<dependency>
|
||||
<groupId>steamwar</groupId>
|
||||
<artifactId>Spigot</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>1.15</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -2,6 +2,8 @@ Spawn:
|
||||
X:
|
||||
Y:
|
||||
Z:
|
||||
Yaw:
|
||||
Pitch:
|
||||
|
||||
Border:
|
||||
MinX:
|
||||
|
@ -38,7 +38,7 @@ public class DoubleJumpListener implements Listener {
|
||||
direction.setZ(direction.getZ() * multiplyer);
|
||||
|
||||
player.setVelocity(direction.add(new Vector(0, 1.2, 0)));
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_FIREWORK_LAUNCH, 1.0F, 1.0F);
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_FIREWORK_ROCKET_LAUNCH, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -8,27 +8,29 @@ import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
public class PlayerConnectionListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void handlePlayerJoin(PlayerJoinEvent event) {
|
||||
event.setJoinMessage(null);
|
||||
Player player = event.getPlayer();
|
||||
|
||||
LobbyPlayer.getLobbyPlayer(player.getUniqueId()); //initialisiert einen neuen LP falls nicht vorhanden
|
||||
|
||||
player.teleport(new Location(Bukkit.getWorlds().get(0), Config.SpawnX, Config.SpawnY, Config.SpawnZ));
|
||||
player.teleport(new Location(Bukkit.getWorlds().get(0), Config.SpawnX, Config.SpawnY, Config.SpawnZ, Config.Yaw, Config.Pitch));
|
||||
player.getInventory().clear();
|
||||
LobbyInventory.givePlayerLobbyItems(player);
|
||||
player.setGameMode(GameMode.ADVENTURE);
|
||||
player.setHealth(20);
|
||||
player.setFoodLevel(20);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void handlePlayerQuit(PlayerQuitEvent event) {
|
||||
event.setQuitMessage(null);
|
||||
}
|
||||
|
@ -21,7 +21,9 @@ public class PlayerMoveListener implements Listener {
|
||||
Bukkit.getWorlds().get(0),
|
||||
Config.SpawnX,
|
||||
Config.SpawnY,
|
||||
Config.SpawnZ));
|
||||
Config.SpawnZ,
|
||||
Config.Yaw,
|
||||
Config.Pitch));
|
||||
}
|
||||
|
||||
private boolean isInRegion(Vector minPoint, Vector maxPoint, Vector location) {
|
||||
|
@ -15,9 +15,11 @@ public class Config {
|
||||
|
||||
//Cache
|
||||
//Spawn
|
||||
public static final int SpawnX;
|
||||
public static final int SpawnY;
|
||||
public static final int SpawnZ;
|
||||
public static final double SpawnX;
|
||||
public static final double SpawnY;
|
||||
public static final double SpawnZ;
|
||||
public static final float Yaw;
|
||||
public static final float Pitch;
|
||||
|
||||
//World Border
|
||||
public static final int BorderMinX;
|
||||
@ -38,6 +40,8 @@ public class Config {
|
||||
SpawnX = config.getInt("Spawn.X");
|
||||
SpawnY = config.getInt("Spawn.Y");
|
||||
SpawnZ = config.getInt("Spawn.Z");
|
||||
Yaw = (float) config.getDouble("Spawn.Yaw");
|
||||
Pitch = (float) config.getDouble("Spawn.Pitch");
|
||||
|
||||
BorderMinX = config.getInt("Border.MinX");
|
||||
BorderMinY = config.getInt("Border.MinY");
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren