-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
52 additions
and
22 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
16 changes: 16 additions & 0 deletions
16
AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/utils/EntityUtil.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,16 @@ | ||
package me.moomoo.anarchyexploitfixes.utils; | ||
|
||
import org.bukkit.entity.EntityType; | ||
|
||
import java.util.HashSet; | ||
import java.util.stream.Collectors; | ||
import java.util.stream.Stream; | ||
|
||
public class EntityUtil { | ||
|
||
public static final HashSet<EntityType> BOATS = Stream.of( | ||
EntityType.BOAT, | ||
EntityType.CHEST_BOAT | ||
).collect(Collectors.toCollection(HashSet::new)); | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,5 +34,4 @@ public void onPacketReceiving(PacketEvent event) { | |
event.setCancelled(true); | ||
} | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
AnarchyExploitFixesLegacy/src/main/java/me/moomoo/anarchyexploitfixes/utils/EntityUtil.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,19 @@ | ||
package me.moomoo.anarchyexploitfixes.utils; | ||
|
||
import org.bukkit.entity.EntityType; | ||
|
||
import java.util.Arrays; | ||
import java.util.HashSet; | ||
import java.util.stream.Collectors; | ||
|
||
public class EntityUtil { | ||
|
||
public static final HashSet<EntityType> BOATS = Arrays.stream(EntityType.values()) | ||
.filter(entityType -> entityType.name().toUpperCase().contains("BOAT")) | ||
.collect(Collectors.toCollection(HashSet::new)); | ||
|
||
public static final HashSet<EntityType> MINECARTS = Arrays.stream(EntityType.values()) | ||
.filter(entityType -> entityType.name().toUpperCase().contains("MINECART")) | ||
.collect(Collectors.toCollection(HashSet::new)); | ||
|
||
} |