Skip to content

Commit

Permalink
Fixed adminmode on 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
SkytAsul committed Jun 18, 2022
1 parent 200bb8d commit 6e3da4a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions core/src/main/java/fr/skytasul/quests/players/AdminMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@ public class AdminMode {

private static final Set<CommandSender> senders = new HashSet<>();

private static ParticleEffect enterParticle = new ParticleEffect(Particle.FLAME, null, null);
private static ParticleEffect leaveParticle = new ParticleEffect(Particle.SMOKE_NORMAL, null, null);
private static ParticleEffect enterParticle;
private static ParticleEffect leaveParticle;

static {
if (NMS.getMCVersion() >= 9) {
enterParticle = new ParticleEffect(Particle.FLAME, null, null);
leaveParticle = new ParticleEffect(Particle.SMOKE_NORMAL, null, null);
}
}

public static void toggle(CommandSender sender){
if (senders.add(sender)) {
Expand Down

0 comments on commit 6e3da4a

Please sign in to comment.