-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Particle, faceLocation, chest sounds, boss bars
- Loading branch information
1 parent
fce8526
commit fbfe208
Showing
31 changed files
with
135 additions
and
597 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
plugin/src/main/java/net/aufdemrand/denizen/objects/properties/item/ItemColor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
plugin/src/main/java/net/aufdemrand/denizen/utilities/entity/BossBarHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package net.aufdemrand.denizen.utilities.entity; | ||
|
||
import org.bukkit.Bukkit; | ||
import org.bukkit.boss.BarColor; | ||
import org.bukkit.boss.BarStyle; | ||
import org.bukkit.boss.BossBar; | ||
import org.bukkit.entity.Player; | ||
|
||
import java.util.*; | ||
|
||
public class BossBarHelper { | ||
|
||
private static final Map<UUID, List<BossBar>> bossBars = new HashMap<>(); | ||
|
||
public static void showSimpleBossBar(Player player, String title, double progress) { | ||
UUID uuid = player.getUniqueId(); | ||
if (!bossBars.containsKey(uuid)) { | ||
bossBars.put(uuid, new ArrayList<>()); | ||
} | ||
List<BossBar> playerBars = bossBars.get(uuid); | ||
if (!playerBars.isEmpty()) { | ||
Iterator<BossBar> iterator = playerBars.iterator(); | ||
while (iterator.hasNext()) { | ||
BossBar bossBar = iterator.next(); | ||
bossBar.removePlayer(player); | ||
iterator.remove(); | ||
} | ||
} | ||
BossBar bossBar = Bukkit.createBossBar(title, BarColor.PURPLE, BarStyle.SOLID); | ||
bossBar.setProgress(progress); | ||
bossBar.addPlayer(player); | ||
bossBar.setVisible(true); | ||
playerBars.add(bossBar); | ||
} | ||
|
||
public static void removeSimpleBossBar(Player player) { | ||
UUID uuid = player.getUniqueId(); | ||
if (bossBars.containsKey(uuid) && !bossBars.get(uuid).isEmpty()) { | ||
Iterator<BossBar> iterator = bossBars.get(uuid).iterator(); | ||
while (iterator.hasNext()) { | ||
BossBar bossBar = iterator.next(); | ||
bossBar.removePlayer(player); | ||
iterator.remove(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
v1_10_R1/src/main/java/net/aufdemrand/denizen/nms/helpers/ParticleHelper_v1_10_R1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,12 @@ | ||
package net.aufdemrand.denizen.nms.helpers; | ||
|
||
import net.aufdemrand.denizen.nms.abstracts.ParticleHelper; | ||
import net.aufdemrand.denizen.nms.impl.effects.Particle_v1_10_R1; | ||
import org.bukkit.Effect; | ||
import org.bukkit.Particle; | ||
|
||
public class ParticleHelper_v1_10_R1 extends ParticleHelper { | ||
|
||
public ParticleHelper_v1_10_R1() { | ||
for (Particle particle : Particle.values()) { | ||
register(particle.name(), new Particle_v1_10_R1(particle)); | ||
} | ||
effectRemap.put("DRIP_WATER", Effect.WATERDRIP); | ||
effectRemap.put("DRIP_LAVA", Effect.LAVADRIP); | ||
register("SMOKE", new Particle_v1_10_R1(Particle.SMOKE_NORMAL)); | ||
register("HUGE_EXPLOSION", new Particle_v1_10_R1(Particle.EXPLOSION_HUGE)); | ||
register("LARGE_EXPLODE", new Particle_v1_10_R1(Particle.EXPLOSION_LARGE)); | ||
register("BUBBLE", new Particle_v1_10_R1(Particle.WATER_BUBBLE)); | ||
register("SUSPEND", new Particle_v1_10_R1(Particle.SUSPENDED)); | ||
register("DEPTH_SUSPEND", new Particle_v1_10_R1(Particle.SUSPENDED_DEPTH)); | ||
register("CRIT", new Particle_v1_10_R1(Particle.CRIT)); | ||
register("MAGIC_CRIT", new Particle_v1_10_R1(Particle.CRIT_MAGIC)); | ||
register("MOB_SPELL", new Particle_v1_10_R1(Particle.SPELL_MOB)); | ||
register("MOB_SPELL_AMBIENT", new Particle_v1_10_R1(Particle.SPELL_MOB_AMBIENT)); | ||
register("INSTANT_SPELL", new Particle_v1_10_R1(Particle.SPELL_INSTANT)); | ||
register("WITCH_MAGIC", new Particle_v1_10_R1(Particle.SPELL_WITCH)); | ||
register("STEP_SOUND", new Particle_v1_10_R1(Particle.HEART)); | ||
register("EXPLODE", new Particle_v1_10_R1(Particle.EXPLOSION_NORMAL)); | ||
register("SPLASH", new Particle_v1_10_R1(Particle.WATER_SPLASH)); | ||
register("LARGE_SMOKE", new Particle_v1_10_R1(Particle.SMOKE_LARGE)); | ||
register("RED_DUST", new Particle_v1_10_R1(Particle.REDSTONE)); | ||
register("SNOWBALL_POOF", new Particle_v1_10_R1(Particle.SNOWBALL)); | ||
register("ANGRY_VILLAGER", new Particle_v1_10_R1(Particle.VILLAGER_ANGRY)); | ||
register("HAPPY_VILLAGER", new Particle_v1_10_R1(Particle.VILLAGER_HAPPY)); | ||
} | ||
} |
Oops, something went wrong.