Skip to content

Commit

Permalink
Remove sys out statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorfromhell committed Feb 18, 2024
1 parent 5f1d012 commit 7ef32bf
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ public void onChangeWorld(PlayerChangedWorldEvent event) {
event.getPlayer().setGameMode(mode);
}

System.out.println("Effects Checks");

final String cfgPrevPath = "worlds-to-load." + event.getFrom().getName();
if(PhantomWorlds.instance().data.getConfig().contains(cfgPrevPath + ".effects") &&
PhantomWorlds.instance().data.getConfig().isConfigurationSection(cfgPrevPath + ".effects")) {
Expand All @@ -79,14 +77,10 @@ public void onChangeWorld(PlayerChangedWorldEvent event) {
if(PhantomWorlds.instance().data.getConfig().contains(cfgPath + ".effects") &&
PhantomWorlds.instance().data.getConfig().isConfigurationSection(cfgPath + ".effects") && !event.getPlayer().hasPermission("phantomworlds.world.bypass.effects")) {

System.out.println("Apply effects.");

for(final String effName : PhantomWorlds.instance().data.getConfig().getConfigurationSection(cfgPath + ".effects").getKeys(false)) {
final int duration = PhantomWorlds.instance().data.getConfig().getInt(cfgPath + ".effects." + effName + ".duration", -1);
final int amplifier = PhantomWorlds.instance().data.getConfig().getInt(cfgPath + ".effects." + effName + ".amplifier", 1);


System.out.println("Apply effect: " + effName);
final PotionEffectType type = PotionEffectType.getByKey(NamespacedKey.fromString(effName));
if(type != null) {
final PotionEffect effect = new PotionEffect(type, duration, amplifier);
Expand Down

0 comments on commit 7ef32bf

Please sign in to comment.