Advertisement
Guest User

Untitled

a guest
May 28th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. package com.fryslan.plugins.core;
  2.  
  3. import com.fryslan.plugins.actions.PluginAction;
  4. import com.runeflex.api.*;
  5. import com.runeflex.api.methods.Skills;
  6. import com.runeflex.api.wrapper.chat.ChatboxMessage;
  7.  
  8. import java.awt.image.BufferedImage;
  9. import java.util.ArrayList;
  10.  
  11. /**
  12. * Created with IntelliJ IDEA.
  13. * User: Piet Jetse
  14. * Date: 18-4-2015
  15. * Time: 18:18
  16. */
  17.  
  18. @PluginInfo(author = "Fryslan", version = "1.0",name = "Fryslan Plugins")
  19. public class Core extends Plugin implements GameSettingListener,ChatboxListener,ExperienceListener,VarpListener{
  20.  
  21. private static ArrayList<PluginAction> actions;
  22.  
  23. public Core(){
  24. actions = new ArrayList<PluginAction>();
  25. }
  26.  
  27. @Override
  28. public BufferedImage getIcon() {
  29. return null;
  30. }
  31.  
  32. @Override
  33. public PluginType getType() {
  34. return null;
  35. }
  36.  
  37. @Override
  38. public void construct(int i, int i1) {
  39.  
  40. }
  41.  
  42. @Override
  43. public void run() {
  44. for(PluginAction action : actions){
  45. if(action != null){
  46. if(action.activate()){
  47. action.execute();
  48. }
  49. }
  50. }
  51. }
  52.  
  53. @Override
  54. public void chatboxMessageReceived(ChatboxMessage chatboxMessage) {
  55. System.out.printf("Message Added In Chatbox : %s",chatboxMessage);
  56. }
  57.  
  58. @Override
  59. public void experienceGained(Skills skills, int i) {
  60. System.out.printf("Experience Added : %s - %s",skills.skillName(),i);
  61. }
  62.  
  63. @Override
  64. public void settingChanged(int i, int i1, int i2) {
  65. System.out.printf("Setting Changed : setting %s from %s to %s",i,i1,i2);
  66. }
  67.  
  68. @Override
  69. public void varpChanged(int i, int i1, int i2) {
  70. System.out.printf("Varp Changed : varp %s from %s to %s",i,i1,i2);
  71. }
  72.  
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement