Skip to content

Commit

Permalink
Change easter egg icon from items adder
Browse files Browse the repository at this point in the history
  • Loading branch information
PainOchoco committed Nov 7, 2023
1 parent de89a20 commit 6513199
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,19 @@ public String onPlaceholderRequest(Player player, String params) {

if (params.startsWith("eastereggs")) {
Optional<YamlConfiguration> data = UsersData.get(player);
if (data.isEmpty()) return null;
if (data.isEmpty())
return null;

if (params.endsWith("worldguard")) {
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
RegionQuery query = container.createQuery();
ApplicableRegionSet set = query.getApplicableRegions(BukkitAdapter.adapt(player.getLocation()));
if (!set.testState(WorldGuardPlugin.inst().wrapPlayer(player), Flags.INVINCIBILITY)) return "";
if (!set.testState(WorldGuardPlugin.inst().wrapPlayer(player), Flags.INVINCIBILITY))
return "";
}

int count = data.get().getList("eggs", new ArrayList<>()).size();
return count + "<font:bread_dough:icons>!</font>";
return count + "<papi:img_easter_egg>";
}
return null;
}
Expand Down

0 comments on commit 6513199

Please sign in to comment.