9
0
mirror of https://gitlab.com/SamB440/rpgregions-2.git synced 2025-12-27 02:39:07 +00:00

Implement VanishEffect

This commit is contained in:
SamB440
2021-10-10 21:31:17 +01:00
parent baf6a41700
commit 918b71018c
2 changed files with 10 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ import net.islandearth.rpgregions.effects.FogEffect;
import net.islandearth.rpgregions.effects.PotionRegionEffect;
import net.islandearth.rpgregions.effects.RegionEffect;
import net.islandearth.rpgregions.effects.RegionEffectRegistry;
import net.islandearth.rpgregions.effects.VanishEffect;
import net.islandearth.rpgregions.exception.CouldNotStartException;
import net.islandearth.rpgregions.gson.AbstractAdapter;
import net.islandearth.rpgregions.gson.ItemStackAdapter;
@@ -256,7 +257,7 @@ public final class RPGRegions extends JavaPlugin implements IRPGRegionsAPI, Lang
}
registry.register(PotionRegionEffect.class);
registry.register(FogEffect.class);
//registry.register(VanishEffect.class); //TODO
registry.register(VanishEffect.class);
}
@Override

View File

@@ -20,6 +20,14 @@ public class VanishEffect extends RegionEffect {
}
}
@Override
public void uneffect(Player player) {
for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {
onlinePlayer.showPlayer((Plugin) RPGRegionsAPI.getAPI(), player);
player.showPlayer((Plugin) RPGRegionsAPI.getAPI(), onlinePlayer);
}
}
@Override
public String getName() {
return "Vanish";