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:
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user