Archiviert
13
0
Dieser Commit ist enthalten in:
Yaruma3341 2020-02-09 22:12:31 +01:00
Ursprung bb88704e7e
Commit 8f7aa54e1d
4 geänderte Dateien mit 21 neuen und 12 gelöschten Zeilen

Datei anzeigen

@ -13,7 +13,7 @@ public class LobbyInventory {
public static Material PLAYER_HIDER = Material.BLAZE_ROD;
public static Material PARTICLE = Material.NAME_TAG;
public static Material ENDERPEARL_USED = Material.FIREWORK_CHARGE;
public static Material ENDERPEARL_USED = Material.FIREWORK_STAR;
public static Material ENDERPEARL_READY = Material.ENDER_PEARL;
public static Material SHIELD = Material.SHIELD;

Datei anzeigen

@ -5,6 +5,7 @@ import de.steamwar.inventory.SWItem;
import de.steamwar.lobby.utils.LobbyPlayer;
import org.bukkit.Effect;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.entity.Player;
import java.util.ArrayList;
@ -22,28 +23,28 @@ public class ParticleInventory {
List<String> lore = new ArrayList<>();
lore.add("§aKlicken zum Auswählen");
SWItem smoke = new SWItem(Material.WEB, "§7Smoke", lore, false, clickType -> {
lobbyPlayer.setParticle(Effect.SMOKE);
SWItem smoke = new SWItem(Material.COBWEB, "§7Smoke", lore, false, clickType -> {
lobbyPlayer.setParticle(Particle.SMOKE_NORMAL);
player.closeInventory();
});
SWItem fire = new SWItem(Material.LAVA_BUCKET, "§cFeuer", lore, false, clickType -> {
lobbyPlayer.setParticle(Effect.LAVA_POP);
lobbyPlayer.setParticle(Particle.DRIP_LAVA);
player.closeInventory();
});
SWItem heart = new SWItem(Material.INK_SACK, (byte) 1, "§cHerzen", lore, false, clickType -> {
lobbyPlayer.setParticle(Effect.HEART);
SWItem heart = new SWItem(Material.RED_DYE, "§cHerzen", lore, false, clickType -> {
lobbyPlayer.setParticle(Particle.HEART);
player.closeInventory();
});
SWItem water = new SWItem(Material.WATER_BUCKET, "§bWasser", lore, false, clickType -> {
lobbyPlayer.setParticle(Effect.WATERDRIP);
lobbyPlayer.setParticle(Particle.DRIP_WATER);
player.closeInventory();
});
SWItem note = new SWItem(Material.NOTE_BLOCK, "§eNoten", lore, false, clickType -> {
lobbyPlayer.setParticle(Effect.NOTE);
lobbyPlayer.setParticle(Particle.NOTE);
player.closeInventory();
});

Datei anzeigen

@ -6,11 +6,13 @@ import de.steamwar.lobby.utils.LobbyPlayer;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.entity.EnderPearl;
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.PlayerKickEvent;
import org.bukkit.event.player.PlayerQuitEvent;
public class PlayerConnectionListener implements Listener {
@ -35,5 +37,11 @@ public class PlayerConnectionListener implements Listener {
event.setQuitMessage(null);
}
@EventHandler
public void handlePlayerKick(PlayerKickEvent event) {
if(event.getReason().equals("Flying is not enabled on this server") && event.getPlayer().getVehicle() instanceof EnderPearl)
event.setCancelled(true);
}
}

Datei anzeigen

@ -1,6 +1,6 @@
package de.steamwar.lobby.utils;
import org.bukkit.Effect;
import org.bukkit.Particle;
import java.util.*;
@ -9,7 +9,7 @@ public class LobbyPlayer {
private static Map<UUID, LobbyPlayer> cache = new HashMap();
private PlayerHiderState hiderState;
private Effect particle;
private Particle particle;
private boolean fly;
private boolean enderPearlUsed;
private boolean shield;
@ -27,11 +27,11 @@ public class LobbyPlayer {
this.hiderState = hiderState;
}
public Effect getParticle() {
public Particle getParticle() {
return particle;
}
public void setParticle(Effect particle) {
public void setParticle(Particle particle) {
this.particle = particle;
}