This repository was archived by the owner on May 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hopper-patch' of https://github.com/crafter23456/NachoS…
…pigot2 into hopper-patch get upstream
- Loading branch information
Showing
6 changed files
with
36 additions
and
12 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
24 changes: 24 additions & 0 deletions
24
NachoSpigot-Server/src/main/java/dev/cobblesword/nachospigot/commons/Dictionary.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,24 @@ | ||
package dev.cobblesword.nachospigot.commons; | ||
|
||
import net.minecraft.server.EnumParticle; | ||
import org.bukkit.Effect; | ||
|
||
import java.util.EnumMap; | ||
|
||
public class Dictionary { | ||
public static final EnumMap<Effect, EnumParticle> EFFECT_TO_PARTICLE = new EnumMap<>(Effect.class); | ||
|
||
static { | ||
String tmp; | ||
for (EnumParticle p : EnumParticle.values()) { | ||
tmp = p.b().replace("_", ""); | ||
for (Effect e : Effect.values()) { | ||
// This is pretty much the original code, but we only call it once / effect & matching particle | ||
if (e.getName() != null && e.getName().startsWith(tmp)) { | ||
EFFECT_TO_PARTICLE.put(e, p); | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
} |
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