Package org.bukkit.event

Examples of org.bukkit.event.Event


            msg.updateTag();
            this.plugin.sendMessage(msg, null, "quits");

            // PLUGIN INTEROP
            msg.setTarget(EndPoint.PLUGIN);
            Event ie = new IRCEvent(Mode.QUIT, msg);
            this.plugin.getServer().getPluginManager().callEvent(ie);
        }
    }
View Full Code Here


        this.plugin.sendMessage(msg, null, "kicks");
        // PLUGIN INTEROP
        if (this.plugin.isDebug())
            CraftIRC.log.info(String.format(CraftIRC.NAME + " Minebot IRCEVENT.KICK"));
        msg.setTarget(EndPoint.PLUGIN);
        Event ie = new IRCEvent(Mode.KICK, msg);
        this.plugin.getServer().getPluginManager().callEvent(ie);
    }
View Full Code Here

        // PLUGIN INTEROP
        if (this.plugin.isDebug())
            CraftIRC.log.info(String.format(CraftIRC.NAME + " Minebot IRCEVENT.NICKCHANGE"));
       
        msg.setTarget(EndPoint.PLUGIN);
        Event ie = new IRCEvent(Mode.NICKCHANGE, msg);
        this.plugin.getServer().getPluginManager().callEvent(ie);
    }
View Full Code Here

                msg.srcChannel = channel;
                msg.message = message.substring(cmdPrefix.length());
                msg.updateTag();
                // PLUGIN INTEROP
                msg.setTarget(EndPoint.PLUGIN);
                Event ie = new IRCEvent(Mode.AUTHED_COMMAND, msg);
                this.plugin.getServer().getPluginManager().callEvent(ie);
                if (((IRCEvent)ie).isHandled()) return;
               
            } // End admin commands

            // Begin public commands

            // Send all IRC chatter (no command prefixes or ignored command prefixes)
            if (!ircCmdPrefixes.contains(message.substring(0, 0)) && !message.startsWith(cmdPrefix)) {
                if (this.plugin.isDebug()) {
                    CraftIRC.log.info(String.format(CraftIRC.NAME + " Minebot allchat"));
                }
                RelayedMessage msg = this.plugin.newMsg(EndPoint.IRC, EndPoint.BOTH);
                msg.formatting = "chat";
                msg.sender = sender;
                msg.srcBot = botId;
                msg.srcChannel = channel;
                msg.message = message;
                msg.updateTag();
                this.plugin.sendMessage(msg, null, "all-chat");
                // PLUGIN INTEROP
                if (this.plugin.isDebug())
                    CraftIRC.log.info(String.format(CraftIRC.NAME + " Minebot IRCEVENT.MSG"));
               
                msg.setTarget(EndPoint.PLUGIN);
                Event ie = new IRCEvent(Mode.MSG, msg);
                this.plugin.getServer().getPluginManager().callEvent(ie);
                return;
            }

            // .say - Send single message to the game
            else if (message.startsWith(cmdPrefix + "say ") || message.startsWith(cmdPrefix + "mc ")) {
                if (splitMessage.length > 1) {
                    RelayedMessage msg = this.plugin.newMsg(EndPoint.IRC, EndPoint.GAME);
                    msg.formatting = "chat";
                    msg.sender = sender;
                    msg.srcBot = botId;
                    msg.srcChannel = channel;
                    msg.message = command;
                    msg.updateTag();
                    this.plugin.sendMessage(msg, null, null);
                    this.sendNotice(sender, "Message sent to game");
                    return;
                }

            } else if (message.startsWith(cmdPrefix + "players")) {
                if (this.plugin.isDebug()) {
                    CraftIRC.log.info(String.format(CraftIRC.NAME + " Minebot .players command"));
                }
                String playerListing = this.getPlayerList();
                this.sendMessage(channel, playerListing);
                return;

            } else {
                // IRCEvent - COMMAND
                if (this.plugin.isDebug()) {
                    CraftIRC.log.info(String.format(CraftIRC.NAME + " Minebot IRCEVENT.COMMAND"));
                }
                RelayedMessage msg = this.plugin.newMsg(EndPoint.IRC, EndPoint.BOTH);
                msg.formatting = "";
                msg.sender = sender;
                msg.srcBot = botId;
                msg.srcChannel = channel;
                msg.message = message.substring(cmdPrefix.length());
                msg.updateTag();
                // PLUGIN INTEROP
                msg.setTarget(EndPoint.PLUGIN);
                Event ie = new IRCEvent(Mode.COMMAND, msg);
                this.plugin.getServer().getPluginManager().callEvent(ie);
            }

        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

                msg.srcChannel = "";
                msg.message = message;
                msg.updateTag();
                // PLUGIN INTEROP
                msg.setTarget(EndPoint.PLUGIN);
                Event ie = new IRCEvent(Mode.PRIVMSG, msg);
                this.plugin.getServer().getPluginManager().callEvent(ie);
            }

        } catch (Exception e) {
        }
View Full Code Here

        msg.updateTag();
        this.plugin.sendMessage(msg, null, "all-chat");

        //PLUGIN INTEROP
        msg.setTarget(EndPoint.PLUGIN);
        Event ie = new IRCEvent(Mode.ACTION, msg);
        this.plugin.getServer().getPluginManager().callEvent(ie);

    }
View Full Code Here

  }
 
  private final static Collection<Trigger> start = new ArrayList<Trigger>(), stop = new ArrayList<Trigger>();
 
  public static void onSkriptStart() {
    final Event e = new SkriptStartEvent();
    for (final Trigger t : start)
      t.execute(e);
  }
View Full Code Here

    for (final Trigger t : start)
      t.execute(e);
  }
 
  public static void onSkriptStop() {
    final Event e = new SkriptStopEvent();
    for (final Trigger t : stop)
      t.execute(e);
  }
View Full Code Here

TOP

Related Classes of org.bukkit.event.Event

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.