Archived
0

Update to APIv4. I hope this no borke git.

This commit is contained in:
Pepich
2017-09-17 15:34:22 +02:00
parent e0fee3b145
commit 77c8fa3fb7
47 changed files with 1248 additions and 989 deletions

View File

@@ -6,11 +6,13 @@ import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import com.nemez.cmdmgr.Command;
import com.redstoner.annotations.Commands;
import com.redstoner.annotations.Version;
import com.redstoner.misc.Utils;
import com.redstoner.misc.CommandHolderType;
import com.redstoner.modules.Module;
@Version(major = 2, minor = 0, revision = 1, compatible = 2)
@Commands(CommandHolderType.String)
@Version(major = 4, minor = 0, revision = 0, compatible = 4)
public class Illumination implements Module
{
PotionEffect effect = new PotionEffect(PotionEffectType.NIGHT_VISION, Integer.MAX_VALUE, 0, false, false);
@@ -22,12 +24,12 @@ public class Illumination implements Module
if (player.hasPotionEffect(PotionEffectType.NIGHT_VISION))
{
player.removePotionEffect(PotionEffectType.NIGHT_VISION);
Utils.sendMessage(sender, null, "Night Vision Disabled.");
getLogger().message(sender, "Night Vision Disabled.");
}
else
{
player.addPotionEffect(effect, true);
Utils.sendMessage(sender, null, "Night Vision Enabled.");
getLogger().message(sender, "Night Vision Enabled.");
}
}