ITEM EFFECT

Discussion in 'Plugin Development' started by ToPoEdiTs, Aug 4, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    ToPoEdiTs

  2. Offline

    Konkz

    I'm guessing org.bukkit.Effect.POTION_BREAK is what you're looking for.
     
  3. Offline

    ToPoEdiTs

    I've been looking into potion break and can not find it and tried with this:
    I want some help to do that when you click with a pen as you speed or something (effect of a potion):

    Code:
    import com.google.common.collect.Maps;
    import java.util.Map;
    import org.bukkit.Effect;
    import org.bukkit.Material;
    import org.bukkit.block.BlockFace;
    import org.bukkit.plugin.java.JavaPlugin;
    import org.bukkit.potion.Potion;
     
    public class Asesino extends JavaPlugin {
        private final int id;
        public void onEnable(){
           
        }
       
       
      public enum Effect {
     
          POTION_BREAK(2002, Type.VISUAL, Potion.class),
           
            private final int id;
        private final Type type;
          private final Class<?> data;
          private static final Map<Integer, Effect> BY_ID = Maps.newHashMap();
     
          Asesino(int id, Type type) {
              this(id,type,null);
          }
       
            Asesino(int id, Type type, Class<?> data) {
              this.id = id;
              this.type = type;
              this.data = data;
            }
     
          @Deprecated
          public int getId() {
              return this.id;
          }
     
          public Type getType() {
              return this.type;
        }
     
          public Class<?> getData() {
              return this.data;
          }
     
          @Deprecated
          public static Effect getById(int id) {
              return BY_ID.get(id);
          }
     
          static {
            for (Effect effect : values()) {
                  BY_ID.put(effect.id, effect);
            }
          }
     
        public enum Type {SOUND, VISUAL}
    }
    
     
  4. Offline

    XgXXSnipz

Thread Status:
Not open for further replies.

Share This Page