Explorar el Código

BETA: Removing init() abstract method from L2Script.

Zoey76 hace 13 años
padre
commit
7acd751efc

+ 6 - 13
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/impl/L2Script.java

@@ -78,12 +78,16 @@ import com.l2jserver.gameserver.scripting.scriptengine.listeners.talk.ChatListen
  * L2Script is an extension of Quest.java which makes use of the L2J listeners.<br>
  * It is much more in-depth than its predecessor,<br>
  * It is strongly recommended for the more advanced developers.<br>
- * Methods with boolean return values can be used as code blockers. This means that if the return is false, the action for which the listener was fired does not happen.<br>
+ * Methods with boolean return values can be used as code blockers.<br>
+ * This means that if the return is false, the action for which the listener was fired does not happen.<br>
+ * New in this version: profession change + player level change.
+ * TODO: pet item use listeners.
+ * TODO: player subclass listeners ?? (needed?)
  * @author TheOne
  */
 public abstract class L2Script extends Quest
 {
-	private final List<L2JListener> _listeners = new ArrayList<L2JListener>();
+	private final List<L2JListener> _listeners = new ArrayList<>();
 	
 	/**
 	 * constructor
@@ -93,7 +97,6 @@ public abstract class L2Script extends Quest
 	public L2Script(String name, String descr)
 	{
 		super(-1, name, descr);
-		init();
 	}
 	
 	/**
@@ -105,18 +108,8 @@ public abstract class L2Script extends Quest
 	public L2Script(int questId, String name, String descr)
 	{
 		super(questId, name, descr);
-		init();
 	}
 	
-	// New in this version: profession change + player level change
-	// TODO: pet item use listeners
-	// TODO: player subclass listeners ?? (needed?)
-	
-	/**
-	 * Initialize the variables and listeners/notifiers here This method is called automatically! No need to call it again ;)
-	 */
-	public abstract void init();
-	
 	/**
 	 * Unloads the script
 	 */