nfell2009

Untitled

Dec 28th, 2014
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.05 KB | None | 0 0
  1. package uk.nfell2009.umbaska.Dynmap;
  2.  
  3. import ch.njol.skript.lang.Effect;
  4. import ch.njol.skript.lang.Expression;
  5. import ch.njol.skript.lang.SkriptParser;
  6. import ch.njol.util.Kleenean;
  7.  
  8. import org.bukkit.event.Event;
  9. import org.dynmap.DynmapAPI;
  10. import org.dynmap.DynmapCommonAPIListener;
  11. import org.dynmap.DynmapCore;
  12.  
  13. public class EffSetVis extends Effect {
  14.  
  15.   private Expression<String> player;
  16.   private Expression<Boolean> vis;
  17.  
  18.   @Override
  19.   protected void execute(Event event){
  20.             String p = player.getSingle(event);
  21.             Boolean v = vis.getSingle(event);
  22.             DynmapAPI dyn = new DynmapAPI();
  23.             dyn.setPlayerVisiblity(p, v);
  24.   }
  25.  
  26.  
  27.   @Override
  28.   public String toString(Event event, boolean b){
  29.     return "Set player visibility";
  30.   }
  31.  
  32.   @Override
  33.   @SuppressWarnings("unchecked")
  34.   public boolean init(Expression<?>[] expressions, int i, Kleenean kleenean, SkriptParser.ParseResult parseResult){
  35.         player = (Expression<String>) expressions[0];
  36.         vis = (Expression<Boolean>) expressions[1];
  37.         return true;
  38.   }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment