浏览代码

BETA: Fixed encoding of some files.

MELERIX 13 年之前
父节点
当前提交
2464d914d4
共有 22 个文件被更改,包括 1485 次插入1485 次删除
  1. 53 53
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/impl/L2JListener.java
  2. 74 74
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/character/AttackListener.java
  3. 95 95
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/character/DeathListener.java
  4. 115 115
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/character/SkillUseListener.java
  5. 57 57
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/clan/ClanCreationListener.java
  6. 66 66
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/clan/ClanMembershipListener.java
  7. 57 57
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/clan/ClanWarListener.java
  8. 78 78
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/clan/ClanWarehouseListener.java
  9. 55 55
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/events/FortSiegeListener.java
  10. 61 61
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/events/SiegeListener.java
  11. 64 64
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/events/TvTListener.java
  12. 58 58
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/AugmentListener.java
  13. 58 58
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/DropListener.java
  14. 78 78
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/EquipmentListener.java
  15. 56 56
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/HennaListener.java
  16. 87 87
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/ItemTracker.java
  17. 60 60
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/NewItemListener.java
  18. 46 46
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/PlayerDespawnListener.java
  19. 50 50
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/PlayerSpawnListener.java
  20. 63 63
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/TransformListener.java
  21. 52 52
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/talk/ChatFilterListener.java
  22. 102 102
      L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/talk/ChatListener.java

+ 53 - 53
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/impl/L2JListener.java

@@ -1,53 +1,53 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.impl;
-
-import java.util.logging.Logger;
-
-import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
-
-/**
- * Convenience superclass for all the L2J listeners.<br>
- * Forces having the register() and unregister() methods in all its children.<br>
- * The register() method is called automatically when the listener is instanciated.<br>
- * These are 2 convenience methods to avoid having to register the listeners ourselves. This is particularly useful for our less advanced coders.
- * @author TheOne
- */
-public abstract class L2JListener
-{
-	public static Logger log = Logger.getLogger(L2JListener.class.getName());
-	
-	public L2PcInstance player = null;
-	
-	/**
-	 * Convenience method to add this listener in its proper place.<br>
-	 * Called automatically by the superconstructor when the class is instanciated.
-	 */
-	public abstract void register();
-	
-	/**
-	 * Convenience method to remove this listener
-	 */
-	public abstract void unregister();
-	
-	/**
-	 * Returns the player attached to this listener
-	 * @return
-	 */
-	public L2PcInstance getPlayer()
-	{
-		return player;
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.impl;
+
+import java.util.logging.Logger;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+ * Convenience superclass for all the L2J listeners.<br>
+ * Forces having the register() and unregister() methods in all its children.<br>
+ * The register() method is called automatically when the listener is instanciated.<br>
+ * These are 2 convenience methods to avoid having to register the listeners ourselves. This is particularly useful for our less advanced coders.
+ * @author TheOne
+ */
+public abstract class L2JListener
+{
+	public static Logger log = Logger.getLogger(L2JListener.class.getName());
+	
+	public L2PcInstance player = null;
+	
+	/**
+	 * Convenience method to add this listener in its proper place.<br>
+	 * Called automatically by the superconstructor when the class is instanciated.
+	 */
+	public abstract void register();
+	
+	/**
+	 * Convenience method to remove this listener
+	 */
+	public abstract void unregister();
+	
+	/**
+	 * Returns the player attached to this listener
+	 * @return
+	 */
+	public L2PcInstance getPlayer()
+	{
+		return player;
+	}
+}

+ 74 - 74
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/character/AttackListener.java

@@ -1,74 +1,74 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.character;
-
-import com.l2jserver.gameserver.model.actor.L2Character;
-import com.l2jserver.gameserver.scripting.scriptengine.events.AttackEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * @author TheOne
- */
-public abstract class AttackListener extends L2JListener
-{
-	private L2Character _character = null;
-	
-	/**
-	 * Constructor.<br>
-	 * AttackListener is not a static listener, it needs to be registered for each L2Character you wish to use it for.<br>
-	 * It will work for both NPCs and Players
-	 * @param character
-	 */
-	public AttackListener(L2Character character)
-	{
-		_character = character;
-		register();
-	}
-	
-	/**
-	 * The player just attacked another character
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onAttack(AttackEvent event);
-	
-	/**
-	 * The player was just attacked by another character
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean isAttacked(AttackEvent event);
-	
-	@Override
-	public void register()
-	{
-		_character.addAttackListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		_character.removeAttackListener(this);
-	}
-	
-	/**
-	 * returns the L2Character this listener is attached to
-	 * @return
-	 */
-	public L2Character getCharacter()
-	{
-		return _character;
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.character;
+
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.scripting.scriptengine.events.AttackEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * @author TheOne
+ */
+public abstract class AttackListener extends L2JListener
+{
+	private L2Character _character = null;
+	
+	/**
+	 * Constructor.<br>
+	 * AttackListener is not a static listener, it needs to be registered for each L2Character you wish to use it for.<br>
+	 * It will work for both NPCs and Players
+	 * @param character
+	 */
+	public AttackListener(L2Character character)
+	{
+		_character = character;
+		register();
+	}
+	
+	/**
+	 * The player just attacked another character
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onAttack(AttackEvent event);
+	
+	/**
+	 * The player was just attacked by another character
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean isAttacked(AttackEvent event);
+	
+	@Override
+	public void register()
+	{
+		_character.addAttackListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		_character.removeAttackListener(this);
+	}
+	
+	/**
+	 * returns the L2Character this listener is attached to
+	 * @return
+	 */
+	public L2Character getCharacter()
+	{
+		return _character;
+	}
+}

+ 95 - 95
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/character/DeathListener.java

@@ -1,95 +1,95 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.character;
-
-import com.l2jserver.gameserver.model.actor.L2Character;
-import com.l2jserver.gameserver.scripting.scriptengine.events.DeathEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * Death/Kill listener<br>
- * Works for NPCs and Players
- * @author TheOne
- */
-public abstract class DeathListener extends L2JListener
-{
-	private L2Character _character = null;
-	private boolean _isGlobal = false;
-	
-	/**
-	 * constructor To have a global listener, set character to null
-	 * @param character
-	 */
-	public DeathListener(L2Character character)
-	{
-		if (character == null)
-		{
-			_isGlobal = true;
-		}
-		_character = character;
-		register();
-	}
-	
-	/**
-	 * The character just killed the target<br>
-	 * If you use this listener as global, use: onDeathGlobal()
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onKill(DeathEvent event);
-	
-	/**
-	 * The character was just killed by the target<br>
-	 * If you use this listener as global, use: onDeathGlobal()
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onDeath(DeathEvent event);
-	
-	/**
-	 * Returns the character
-	 * @return
-	 */
-	public L2Character getCharacter()
-	{
-		return _character;
-	}
-	
-	@Override
-	public void register()
-	{
-		if (_isGlobal)
-		{
-			L2Character.addGlobalDeathListener(this);
-		}
-		else
-		{
-			_character.addDeathListener(this);
-		}
-	}
-	
-	@Override
-	public void unregister()
-	{
-		if (_isGlobal)
-		{
-			L2Character.removeGlobalDeathListener(this);
-		}
-		else
-		{
-			_character.removeDeathListener(this);
-		}
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.character;
+
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.scripting.scriptengine.events.DeathEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * Death/Kill listener<br>
+ * Works for NPCs and Players
+ * @author TheOne
+ */
+public abstract class DeathListener extends L2JListener
+{
+	private L2Character _character = null;
+	private boolean _isGlobal = false;
+	
+	/**
+	 * constructor To have a global listener, set character to null
+	 * @param character
+	 */
+	public DeathListener(L2Character character)
+	{
+		if (character == null)
+		{
+			_isGlobal = true;
+		}
+		_character = character;
+		register();
+	}
+	
+	/**
+	 * The character just killed the target<br>
+	 * If you use this listener as global, use: onDeathGlobal()
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onKill(DeathEvent event);
+	
+	/**
+	 * The character was just killed by the target<br>
+	 * If you use this listener as global, use: onDeathGlobal()
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onDeath(DeathEvent event);
+	
+	/**
+	 * Returns the character
+	 * @return
+	 */
+	public L2Character getCharacter()
+	{
+		return _character;
+	}
+	
+	@Override
+	public void register()
+	{
+		if (_isGlobal)
+		{
+			L2Character.addGlobalDeathListener(this);
+		}
+		else
+		{
+			_character.addDeathListener(this);
+		}
+	}
+	
+	@Override
+	public void unregister()
+	{
+		if (_isGlobal)
+		{
+			L2Character.removeGlobalDeathListener(this);
+		}
+		else
+		{
+			_character.removeDeathListener(this);
+		}
+	}
+}

+ 115 - 115
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/character/SkillUseListener.java

@@ -1,115 +1,115 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.character;
-
-import com.l2jserver.gameserver.model.actor.L2Character;
-import com.l2jserver.gameserver.scripting.scriptengine.events.SkillUseEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * @author TheOne
- */
-public abstract class SkillUseListener extends L2JListener
-{
-	private L2Character _character = null;
-	private int _skillId = -1;
-	private int _npcId = -1;
-	private boolean _characterSpecific = false;
-	
-	/**
-	 * constructor L2Character specific, will only be fired when this L2Character uses the specified skill Use skillId = -1 to be notified of all skills used
-	 * @param character
-	 * @param skillId
-	 */
-	public SkillUseListener(L2Character character, int skillId)
-	{
-		_skillId = skillId;
-		_character = character;
-		_characterSpecific = true;
-		register();
-	}
-	
-	/**
-	 * constructor NPC specific, will only be triggered when npc with the given ID uses the correct skill Use skillId = -1 to be notified of all skills used Use npcId = -1 to be notified for all NPCs use npcId = -2 to be notified for all players use npcId = -3 to be notified for all L2Characters
-	 * @param npcId
-	 * @param skillId
-	 */
-	public SkillUseListener(int npcId, int skillId)
-	{
-		_skillId = skillId;
-		_npcId = npcId;
-		register();
-	}
-	
-	/**
-	 * A L2Character just cast a skill
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onSkillUse(SkillUseEvent event);
-	
-	@Override
-	public void register()
-	{
-		if (!_characterSpecific)
-		{
-			L2Character.addGlobalSkillUseListener(this);
-		}
-		else
-		{
-			_character.addSkillUseListener(this);
-		}
-	}
-	
-	@Override
-	public void unregister()
-	{
-		if (!_characterSpecific)
-		{
-			L2Character.removeGlobalSkillUseListener(this);
-		}
-		else
-		{
-			_character.removeSkillUseListener(this);
-		}
-	}
-	
-	/**
-	 * Returns the npcId this listener will be triggered for
-	 * @return
-	 */
-	public int getNpcId()
-	{
-		return _npcId;
-	}
-	
-	/**
-	 * Returns the skillId this listener will be triggered for
-	 * @return
-	 */
-	public int getSkillId()
-	{
-		return _skillId;
-	}
-	
-	/**
-	 * Returns the L2Character this listener is attached to
-	 * @return
-	 */
-	public L2Character getCharacter()
-	{
-		return _character;
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.character;
+
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.scripting.scriptengine.events.SkillUseEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * @author TheOne
+ */
+public abstract class SkillUseListener extends L2JListener
+{
+	private L2Character _character = null;
+	private int _skillId = -1;
+	private int _npcId = -1;
+	private boolean _characterSpecific = false;
+	
+	/**
+	 * constructor L2Character specific, will only be fired when this L2Character uses the specified skill Use skillId = -1 to be notified of all skills used
+	 * @param character
+	 * @param skillId
+	 */
+	public SkillUseListener(L2Character character, int skillId)
+	{
+		_skillId = skillId;
+		_character = character;
+		_characterSpecific = true;
+		register();
+	}
+	
+	/**
+	 * constructor NPC specific, will only be triggered when npc with the given ID uses the correct skill Use skillId = -1 to be notified of all skills used Use npcId = -1 to be notified for all NPCs use npcId = -2 to be notified for all players use npcId = -3 to be notified for all L2Characters
+	 * @param npcId
+	 * @param skillId
+	 */
+	public SkillUseListener(int npcId, int skillId)
+	{
+		_skillId = skillId;
+		_npcId = npcId;
+		register();
+	}
+	
+	/**
+	 * A L2Character just cast a skill
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onSkillUse(SkillUseEvent event);
+	
+	@Override
+	public void register()
+	{
+		if (!_characterSpecific)
+		{
+			L2Character.addGlobalSkillUseListener(this);
+		}
+		else
+		{
+			_character.addSkillUseListener(this);
+		}
+	}
+	
+	@Override
+	public void unregister()
+	{
+		if (!_characterSpecific)
+		{
+			L2Character.removeGlobalSkillUseListener(this);
+		}
+		else
+		{
+			_character.removeSkillUseListener(this);
+		}
+	}
+	
+	/**
+	 * Returns the npcId this listener will be triggered for
+	 * @return
+	 */
+	public int getNpcId()
+	{
+		return _npcId;
+	}
+	
+	/**
+	 * Returns the skillId this listener will be triggered for
+	 * @return
+	 */
+	public int getSkillId()
+	{
+		return _skillId;
+	}
+	
+	/**
+	 * Returns the L2Character this listener is attached to
+	 * @return
+	 */
+	public L2Character getCharacter()
+	{
+		return _character;
+	}
+}

+ 57 - 57
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/clan/ClanCreationListener.java

@@ -1,57 +1,57 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.clan;
-
-import com.l2jserver.gameserver.model.L2Clan;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ClanCreationEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ClanLevelUpEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * This class notifies of clan creation and
- * @author TheOne
- */
-public abstract class ClanCreationListener extends L2JListener
-{
-	public ClanCreationListener()
-	{
-		register();
-	}
-	
-	/**
-	 * Fired when a clan is created
-	 * @param event
-	 */
-	public abstract void onClanCreate(ClanCreationEvent event);
-	
-	/**
-	 * Fired when a clan levels up
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onClanLevelUp(ClanLevelUpEvent event);
-	
-	@Override
-	public void register()
-	{
-		L2Clan.addClanCreationListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		L2Clan.removeClanCreationListener(this);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.clan;
+
+import com.l2jserver.gameserver.model.L2Clan;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ClanCreationEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ClanLevelUpEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * This class notifies of clan creation and
+ * @author TheOne
+ */
+public abstract class ClanCreationListener extends L2JListener
+{
+	public ClanCreationListener()
+	{
+		register();
+	}
+	
+	/**
+	 * Fired when a clan is created
+	 * @param event
+	 */
+	public abstract void onClanCreate(ClanCreationEvent event);
+	
+	/**
+	 * Fired when a clan levels up
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onClanLevelUp(ClanLevelUpEvent event);
+	
+	@Override
+	public void register()
+	{
+		L2Clan.addClanCreationListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		L2Clan.removeClanCreationListener(this);
+	}
+}

+ 66 - 66
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/clan/ClanMembershipListener.java

@@ -1,66 +1,66 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.clan;
-
-import com.l2jserver.gameserver.model.L2Clan;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ClanJoinEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ClanLeaderChangeEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ClanLeaveEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * Clan join and leave notifiers
- * @author TheOne
- */
-public abstract class ClanMembershipListener extends L2JListener
-{
-	public ClanMembershipListener()
-	{
-		register();
-	}
-	
-	/**
-	 * A player just joined the clan
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onJoin(ClanJoinEvent event);
-	
-	/**
-	 * A player just left the clan
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onLeave(ClanLeaveEvent event);
-	
-	/**
-	 * Fired when the clan leader changes
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onLeaderChange(ClanLeaderChangeEvent event);
-	
-	@Override
-	public void register()
-	{
-		L2Clan.addClanMembershipListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		L2Clan.removeClanMembershipListener(this);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.clan;
+
+import com.l2jserver.gameserver.model.L2Clan;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ClanJoinEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ClanLeaderChangeEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ClanLeaveEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * Clan join and leave notifiers
+ * @author TheOne
+ */
+public abstract class ClanMembershipListener extends L2JListener
+{
+	public ClanMembershipListener()
+	{
+		register();
+	}
+	
+	/**
+	 * A player just joined the clan
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onJoin(ClanJoinEvent event);
+	
+	/**
+	 * A player just left the clan
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onLeave(ClanLeaveEvent event);
+	
+	/**
+	 * Fired when the clan leader changes
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onLeaderChange(ClanLeaderChangeEvent event);
+	
+	@Override
+	public void register()
+	{
+		L2Clan.addClanMembershipListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		L2Clan.removeClanMembershipListener(this);
+	}
+}

+ 57 - 57
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/clan/ClanWarListener.java

@@ -1,57 +1,57 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.clan;
-
-import com.l2jserver.gameserver.datatables.ClanTable;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ClanWarEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * Notifies when a clan war starts or ends
- * @author TheOne
- */
-public abstract class ClanWarListener extends L2JListener
-{
-	public ClanWarListener()
-	{
-		register();
-	}
-	
-	/**
-	 * Clan war just started
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onWarStart(ClanWarEvent event);
-	
-	/**
-	 * Clan war just ended
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onWarEnd(ClanWarEvent event);
-	
-	@Override
-	public void register()
-	{
-		ClanTable.addClanWarListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		ClanTable.removeClanWarListener(this);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.clan;
+
+import com.l2jserver.gameserver.datatables.ClanTable;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ClanWarEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * Notifies when a clan war starts or ends
+ * @author TheOne
+ */
+public abstract class ClanWarListener extends L2JListener
+{
+	public ClanWarListener()
+	{
+		register();
+	}
+	
+	/**
+	 * Clan war just started
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onWarStart(ClanWarEvent event);
+	
+	/**
+	 * Clan war just ended
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onWarEnd(ClanWarEvent event);
+	
+	@Override
+	public void register()
+	{
+		ClanTable.addClanWarListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		ClanTable.removeClanWarListener(this);
+	}
+}

+ 78 - 78
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/clan/ClanWarehouseListener.java

@@ -1,78 +1,78 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.clan;
-
-import com.l2jserver.gameserver.model.L2Clan;
-import com.l2jserver.gameserver.model.itemcontainer.ClanWarehouse;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ClanWarehouseAddItemEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ClanWarehouseDeleteItemEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ClanWarehouseTransferEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * @author TheOne
- */
-public abstract class ClanWarehouseListener extends L2JListener
-{
-	private final ClanWarehouse _clanWarehouse;
-	
-	public ClanWarehouseListener(L2Clan clan)
-	{
-		_clanWarehouse = (ClanWarehouse) clan.getWarehouse();
-		register();
-	}
-	
-	/**
-	 * An item was just added
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onAddItem(ClanWarehouseAddItemEvent event);
-	
-	/**
-	 * An item was just deleted
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onDeleteItem(ClanWarehouseDeleteItemEvent event);
-	
-	/**
-	 * An item was just transfered
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onTransferItem(ClanWarehouseTransferEvent event);
-	
-	@Override
-	public void register()
-	{
-		_clanWarehouse.addWarehouseListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		_clanWarehouse.removeWarehouseListener(this);
-	}
-	
-	/**
-	 * Returns the clan warehouse attached to this listener
-	 * @return
-	 */
-	public ClanWarehouse getWarehouse()
-	{
-		return _clanWarehouse;
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.clan;
+
+import com.l2jserver.gameserver.model.L2Clan;
+import com.l2jserver.gameserver.model.itemcontainer.ClanWarehouse;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ClanWarehouseAddItemEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ClanWarehouseDeleteItemEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ClanWarehouseTransferEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * @author TheOne
+ */
+public abstract class ClanWarehouseListener extends L2JListener
+{
+	private final ClanWarehouse _clanWarehouse;
+	
+	public ClanWarehouseListener(L2Clan clan)
+	{
+		_clanWarehouse = (ClanWarehouse) clan.getWarehouse();
+		register();
+	}
+	
+	/**
+	 * An item was just added
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onAddItem(ClanWarehouseAddItemEvent event);
+	
+	/**
+	 * An item was just deleted
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onDeleteItem(ClanWarehouseDeleteItemEvent event);
+	
+	/**
+	 * An item was just transfered
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onTransferItem(ClanWarehouseTransferEvent event);
+	
+	@Override
+	public void register()
+	{
+		_clanWarehouse.addWarehouseListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		_clanWarehouse.removeWarehouseListener(this);
+	}
+	
+	/**
+	 * Returns the clan warehouse attached to this listener
+	 * @return
+	 */
+	public ClanWarehouse getWarehouse()
+	{
+		return _clanWarehouse;
+	}
+}

+ 55 - 55
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/events/FortSiegeListener.java

@@ -1,55 +1,55 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.events;
-
-import com.l2jserver.gameserver.model.entity.FortSiege;
-import com.l2jserver.gameserver.scripting.scriptengine.events.FortSiegeEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * @author TheOne
- */
-public abstract class FortSiegeListener extends L2JListener
-{
-	public FortSiegeListener()
-	{
-		register();
-	}
-	
-	/**
-	 * Fired when a fort siege starts
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onStart(FortSiegeEvent event);
-	
-	/**
-	 * Fired when a fort siege ends
-	 * @param event
-	 */
-	public abstract void onEnd(FortSiegeEvent event);
-	
-	@Override
-	public void register()
-	{
-		FortSiege.addFortSiegeListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		FortSiege.removeFortSiegeListener(this);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.events;
+
+import com.l2jserver.gameserver.model.entity.FortSiege;
+import com.l2jserver.gameserver.scripting.scriptengine.events.FortSiegeEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * @author TheOne
+ */
+public abstract class FortSiegeListener extends L2JListener
+{
+	public FortSiegeListener()
+	{
+		register();
+	}
+	
+	/**
+	 * Fired when a fort siege starts
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onStart(FortSiegeEvent event);
+	
+	/**
+	 * Fired when a fort siege ends
+	 * @param event
+	 */
+	public abstract void onEnd(FortSiegeEvent event);
+	
+	@Override
+	public void register()
+	{
+		FortSiege.addFortSiegeListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		FortSiege.removeFortSiegeListener(this);
+	}
+}

+ 61 - 61
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/events/SiegeListener.java

@@ -1,61 +1,61 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.events;
-
-import com.l2jserver.gameserver.model.entity.Siege;
-import com.l2jserver.gameserver.scripting.scriptengine.events.SiegeEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * @author TheOne
- */
-public abstract class SiegeListener extends L2JListener
-{
-	public SiegeListener()
-	{
-		register();
-	}
-	
-	/**
-	 * Fired when a siege starts
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onStart(SiegeEvent event);
-	
-	/**
-	 * Fired when a siege ends
-	 * @param event
-	 */
-	public abstract void onEnd(SiegeEvent event);
-	
-	/**
-	 * Fired when the control of the castle change hands during the siege
-	 * @param event
-	 */
-	public abstract void onControlChange(SiegeEvent event);
-	
-	@Override
-	public void register()
-	{
-		Siege.addSiegeListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		Siege.removeSiegeListener(this);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.events;
+
+import com.l2jserver.gameserver.model.entity.Siege;
+import com.l2jserver.gameserver.scripting.scriptengine.events.SiegeEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * @author TheOne
+ */
+public abstract class SiegeListener extends L2JListener
+{
+	public SiegeListener()
+	{
+		register();
+	}
+	
+	/**
+	 * Fired when a siege starts
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onStart(SiegeEvent event);
+	
+	/**
+	 * Fired when a siege ends
+	 * @param event
+	 */
+	public abstract void onEnd(SiegeEvent event);
+	
+	/**
+	 * Fired when the control of the castle change hands during the siege
+	 * @param event
+	 */
+	public abstract void onControlChange(SiegeEvent event);
+	
+	@Override
+	public void register()
+	{
+		Siege.addSiegeListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		Siege.removeSiegeListener(this);
+	}
+}

+ 64 - 64
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/events/TvTListener.java

@@ -1,64 +1,64 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.events;
-
-import com.l2jserver.gameserver.model.entity.TvTEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.events.TvtKillEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * Notifies when a TvT event starts
- * @author TheOne
- */
-public abstract class TvTListener extends L2JListener
-{
-	public TvTListener()
-	{
-		register();
-	}
-	
-	/**
-	 * Fired when a TvT event starts
-	 */
-	public abstract void onBegin();
-	
-	/**
-	 * A player has been killed
-	 * @param event
-	 */
-	public abstract void onKill(TvtKillEvent event);
-	
-	/**
-	 * Fired when a TvT event ends
-	 */
-	public abstract void onEnd();
-	
-	/**
-	 * Fired when TvT registration starts
-	 */
-	public abstract void onRegistrationStart();
-	
-	@Override
-	public void register()
-	{
-		TvTEvent.addTvTListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		TvTEvent.removeTvtListener(this);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.events;
+
+import com.l2jserver.gameserver.model.entity.TvTEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.events.TvtKillEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * Notifies when a TvT event starts
+ * @author TheOne
+ */
+public abstract class TvTListener extends L2JListener
+{
+	public TvTListener()
+	{
+		register();
+	}
+	
+	/**
+	 * Fired when a TvT event starts
+	 */
+	public abstract void onBegin();
+	
+	/**
+	 * A player has been killed
+	 * @param event
+	 */
+	public abstract void onKill(TvtKillEvent event);
+	
+	/**
+	 * Fired when a TvT event ends
+	 */
+	public abstract void onEnd();
+	
+	/**
+	 * Fired when TvT registration starts
+	 */
+	public abstract void onRegistrationStart();
+	
+	@Override
+	public void register()
+	{
+		TvTEvent.addTvTListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		TvTEvent.removeTvtListener(this);
+	}
+}

+ 58 - 58
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/AugmentListener.java

@@ -1,58 +1,58 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
-
-import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
-import com.l2jserver.gameserver.scripting.scriptengine.events.AugmentEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * Global listener for item augmentation
- * @author TheOne
- */
-public abstract class AugmentListener extends L2JListener
-{
-	public AugmentListener()
-	{
-		register();
-	}
-	
-	/**
-	 * Triggered when a L2ItemInstance is augmented
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onAugment(AugmentEvent event);
-	
-	/**
-	 * Triggered when a L2ItemInstance's augmentation is removed
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onRemoveAugment(AugmentEvent event);
-	
-	@Override
-	public void register()
-	{
-		L2ItemInstance.addAugmentListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		L2ItemInstance.removeAugmentListener(this);
-	}
-	
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
+
+import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
+import com.l2jserver.gameserver.scripting.scriptengine.events.AugmentEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * Global listener for item augmentation
+ * @author TheOne
+ */
+public abstract class AugmentListener extends L2JListener
+{
+	public AugmentListener()
+	{
+		register();
+	}
+	
+	/**
+	 * Triggered when a L2ItemInstance is augmented
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onAugment(AugmentEvent event);
+	
+	/**
+	 * Triggered when a L2ItemInstance's augmentation is removed
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onRemoveAugment(AugmentEvent event);
+	
+	@Override
+	public void register()
+	{
+		L2ItemInstance.addAugmentListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		L2ItemInstance.removeAugmentListener(this);
+	}
+	
+}

+ 58 - 58
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/DropListener.java

@@ -1,58 +1,58 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
-
-import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ItemDropEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ItemPickupEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * Global listener for items dropped by players
- * @author TheOne
- */
-public abstract class DropListener extends L2JListener
-{
-	public DropListener()
-	{
-		register();
-	}
-	
-	/**
-	 * The item was dropped
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onDrop(ItemDropEvent event);
-	
-	/**
-	 * The item was picked up
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onPickup(ItemPickupEvent event);
-	
-	@Override
-	public void register()
-	{
-		L2ItemInstance.addDropListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		L2ItemInstance.removeDropListener(this);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
+
+import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ItemDropEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ItemPickupEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * Global listener for items dropped by players
+ * @author TheOne
+ */
+public abstract class DropListener extends L2JListener
+{
+	public DropListener()
+	{
+		register();
+	}
+	
+	/**
+	 * The item was dropped
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onDrop(ItemDropEvent event);
+	
+	/**
+	 * The item was picked up
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onPickup(ItemPickupEvent event);
+	
+	@Override
+	public void register()
+	{
+		L2ItemInstance.addDropListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		L2ItemInstance.removeDropListener(this);
+	}
+}

+ 78 - 78
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/EquipmentListener.java

@@ -1,78 +1,78 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
-
-import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jserver.gameserver.scripting.scriptengine.events.EquipmentEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * Equip and unequip listener.<br>
- * This listener can be either global or player-based<br>
- * Use the boolean in the constructor!
- * @author TheOne
- */
-public abstract class EquipmentListener extends L2JListener
-{
-	private boolean isGlobal = false;
-	
-	/**
-	 * Constructor To set a global listener, set the L2PcInstance value to null
-	 * @param character
-	 */
-	public EquipmentListener(L2PcInstance character)
-	{
-		player = character;
-		if (character == null)
-		{
-			isGlobal = true;
-		}
-		register();
-	}
-	
-	/**
-	 * The item has just been equipped or unequipped
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onEquip(EquipmentEvent event);
-	
-	@Override
-	public void register()
-	{
-		if (isGlobal)
-		{
-			L2PcInstance.addGlobalEquipmentListener(this);
-		}
-		else
-		{
-			player.addEquipmentListener(this);
-		}
-	}
-	
-	@Override
-	public void unregister()
-	{
-		if (isGlobal)
-		{
-			L2PcInstance.removeGlobalEquipmentListener(this);
-		}
-		else
-		{
-			player.removeEquipmentListener(this);
-		}
-	}
-	
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.scripting.scriptengine.events.EquipmentEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * Equip and unequip listener.<br>
+ * This listener can be either global or player-based<br>
+ * Use the boolean in the constructor!
+ * @author TheOne
+ */
+public abstract class EquipmentListener extends L2JListener
+{
+	private boolean isGlobal = false;
+	
+	/**
+	 * Constructor To set a global listener, set the L2PcInstance value to null
+	 * @param character
+	 */
+	public EquipmentListener(L2PcInstance character)
+	{
+		player = character;
+		if (character == null)
+		{
+			isGlobal = true;
+		}
+		register();
+	}
+	
+	/**
+	 * The item has just been equipped or unequipped
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onEquip(EquipmentEvent event);
+	
+	@Override
+	public void register()
+	{
+		if (isGlobal)
+		{
+			L2PcInstance.addGlobalEquipmentListener(this);
+		}
+		else
+		{
+			player.addEquipmentListener(this);
+		}
+	}
+	
+	@Override
+	public void unregister()
+	{
+		if (isGlobal)
+		{
+			L2PcInstance.removeGlobalEquipmentListener(this);
+		}
+		else
+		{
+			player.removeEquipmentListener(this);
+		}
+	}
+	
+}

+ 56 - 56
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/HennaListener.java

@@ -1,56 +1,56 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
-
-import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jserver.gameserver.scripting.scriptengine.events.HennaEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * @author TheOne
- */
-public abstract class HennaListener extends L2JListener
-{
-	public HennaListener()
-	{
-		register();
-	}
-	
-	/**
-	 * The given henna has just been added to the player
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onAddHenna(HennaEvent event);
-	
-	/**
-	 * The given henna has just been removed from the player
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onRemoveHenna(HennaEvent event);
-	
-	@Override
-	public void register()
-	{
-		L2PcInstance.addHennaListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		L2PcInstance.removeHennaListener(this);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.scripting.scriptengine.events.HennaEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * @author TheOne
+ */
+public abstract class HennaListener extends L2JListener
+{
+	public HennaListener()
+	{
+		register();
+	}
+	
+	/**
+	 * The given henna has just been added to the player
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onAddHenna(HennaEvent event);
+	
+	/**
+	 * The given henna has just been removed from the player
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onRemoveHenna(HennaEvent event);
+	
+	@Override
+	public void register()
+	{
+		L2PcInstance.addHennaListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		L2PcInstance.removeHennaListener(this);
+	}
+}

+ 87 - 87
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/ItemTracker.java

@@ -1,87 +1,87 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
-
-import java.util.List;
-
-import com.l2jserver.gameserver.model.itemcontainer.PcInventory;
-import com.l2jserver.gameserver.scripting.scriptengine.events.AddToInventoryEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ItemDestroyEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ItemDropEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ItemTransferEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * This listener allows you to track items with certain item ids.<br>
- * This can be very useful if you want to make a script which will track all high value items and will log their movements/creation/drop/etc.<br>
- * It can be a great tool to catch hackers on your server ;)
- * @author TheOne
- */
-public abstract class ItemTracker extends L2JListener
-{
-	private final List<Integer> _itemIds;
-	
-	public ItemTracker(List<Integer> itemIds)
-	{
-		_itemIds = itemIds;
-		register();
-	}
-	
-	/**
-	 * The item has been dropped
-	 * @param event
-	 */
-	public abstract void onDrop(ItemDropEvent event);
-	
-	/**
-	 * The item has been added to the inventory
-	 * @param event
-	 */
-	public abstract void onAddToInventory(AddToInventoryEvent event);
-	
-	/**
-	 * Notifies when the item is destroyed
-	 * @param event
-	 */
-	public abstract void onDestroy(ItemDestroyEvent event);
-	
-	/**
-	 * Notifies when the item is transfered or traded
-	 * @param event
-	 */
-	public abstract void onTransfer(ItemTransferEvent event);
-	
-	@Override
-	public void register()
-	{
-		PcInventory.addItemTracker(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		PcInventory.removeItemTracker(this);
-	}
-	
-	/**
-	 * Checks if this item is tracked
-	 * @param itemId
-	 * @return
-	 */
-	public boolean containsItemId(int itemId)
-	{
-		return _itemIds.contains(itemId);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
+
+import java.util.List;
+
+import com.l2jserver.gameserver.model.itemcontainer.PcInventory;
+import com.l2jserver.gameserver.scripting.scriptengine.events.AddToInventoryEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ItemDestroyEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ItemDropEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ItemTransferEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * This listener allows you to track items with certain item ids.<br>
+ * This can be very useful if you want to make a script which will track all high value items and will log their movements/creation/drop/etc.<br>
+ * It can be a great tool to catch hackers on your server ;)
+ * @author TheOne
+ */
+public abstract class ItemTracker extends L2JListener
+{
+	private final List<Integer> _itemIds;
+	
+	public ItemTracker(List<Integer> itemIds)
+	{
+		_itemIds = itemIds;
+		register();
+	}
+	
+	/**
+	 * The item has been dropped
+	 * @param event
+	 */
+	public abstract void onDrop(ItemDropEvent event);
+	
+	/**
+	 * The item has been added to the inventory
+	 * @param event
+	 */
+	public abstract void onAddToInventory(AddToInventoryEvent event);
+	
+	/**
+	 * Notifies when the item is destroyed
+	 * @param event
+	 */
+	public abstract void onDestroy(ItemDestroyEvent event);
+	
+	/**
+	 * Notifies when the item is transfered or traded
+	 * @param event
+	 */
+	public abstract void onTransfer(ItemTransferEvent event);
+	
+	@Override
+	public void register()
+	{
+		PcInventory.addItemTracker(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		PcInventory.removeItemTracker(this);
+	}
+	
+	/**
+	 * Checks if this item is tracked
+	 * @param itemId
+	 * @return
+	 */
+	public boolean containsItemId(int itemId)
+	{
+		return _itemIds.contains(itemId);
+	}
+}

+ 60 - 60
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/NewItemListener.java

@@ -1,60 +1,60 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
-
-import java.util.List;
-
-import com.l2jserver.gameserver.datatables.ItemTable;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ItemCreateEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * Watches for specific item Ids and triggers the listener when one of these items is created
- * @author TheOne
- */
-public abstract class NewItemListener extends L2JListener
-{
-	private final List<Integer> _itemIds;
-	
-	public NewItemListener(List<Integer> itemIds)
-	{
-		_itemIds = itemIds;
-		register();
-	}
-	
-	/**
-	 * An item corresponding to the itemIds list was just created
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onCreate(ItemCreateEvent event);
-	
-	@Override
-	public void register()
-	{
-		ItemTable.addNewItemListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		ItemTable.removeNewItemListener(this);
-	}
-	
-	public boolean containsItemId(int itemId)
-	{
-		return _itemIds.contains(itemId);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
+
+import java.util.List;
+
+import com.l2jserver.gameserver.datatables.ItemTable;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ItemCreateEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * Watches for specific item Ids and triggers the listener when one of these items is created
+ * @author TheOne
+ */
+public abstract class NewItemListener extends L2JListener
+{
+	private final List<Integer> _itemIds;
+	
+	public NewItemListener(List<Integer> itemIds)
+	{
+		_itemIds = itemIds;
+		register();
+	}
+	
+	/**
+	 * An item corresponding to the itemIds list was just created
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onCreate(ItemCreateEvent event);
+	
+	@Override
+	public void register()
+	{
+		ItemTable.addNewItemListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		ItemTable.removeNewItemListener(this);
+	}
+	
+	public boolean containsItemId(int itemId)
+	{
+		return _itemIds.contains(itemId);
+	}
+}

+ 46 - 46
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/PlayerDespawnListener.java

@@ -1,46 +1,46 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
-
-import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jserver.gameserver.network.clientpackets.RequestRestart;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * @author TheOne
- */
-public abstract class PlayerDespawnListener extends L2JListener
-{
-	public PlayerDespawnListener()
-	{
-		register();
-	}
-	
-	public abstract void onDespawn(L2PcInstance player);
-	
-	@Override
-	public void register()
-	{
-		L2PcInstance.addDespawnListener(this);
-		RequestRestart.addDespawnListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		L2PcInstance.removeDespawnListener(this);
-		RequestRestart.removeDespawnListener(this);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.network.clientpackets.RequestRestart;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * @author TheOne
+ */
+public abstract class PlayerDespawnListener extends L2JListener
+{
+	public PlayerDespawnListener()
+	{
+		register();
+	}
+	
+	public abstract void onDespawn(L2PcInstance player);
+	
+	@Override
+	public void register()
+	{
+		L2PcInstance.addDespawnListener(this);
+		RequestRestart.addDespawnListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		L2PcInstance.removeDespawnListener(this);
+		RequestRestart.removeDespawnListener(this);
+	}
+}

+ 50 - 50
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/PlayerSpawnListener.java

@@ -1,50 +1,50 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
-
-import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jserver.gameserver.network.clientpackets.EnterWorld;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * Gets triggered when a L2PcInstance is spawned in the world
- * @author TheOne
- */
-public abstract class PlayerSpawnListener extends L2JListener
-{
-	public PlayerSpawnListener()
-	{
-		register();
-	}
-	
-	/**
-	 * Triggered when a player is spawned
-	 * @param player
-	 */
-	public abstract void onSpawn(L2PcInstance player);
-	
-	@Override
-	public void register()
-	{
-		EnterWorld.addSpawnListener(this);
-		
-	}
-	
-	@Override
-	public void unregister()
-	{
-		EnterWorld.removeSpawnListener(this);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.network.clientpackets.EnterWorld;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * Gets triggered when a L2PcInstance is spawned in the world
+ * @author TheOne
+ */
+public abstract class PlayerSpawnListener extends L2JListener
+{
+	public PlayerSpawnListener()
+	{
+		register();
+	}
+	
+	/**
+	 * Triggered when a player is spawned
+	 * @param player
+	 */
+	public abstract void onSpawn(L2PcInstance player);
+	
+	@Override
+	public void register()
+	{
+		EnterWorld.addSpawnListener(this);
+		
+	}
+	
+	@Override
+	public void unregister()
+	{
+		EnterWorld.removeSpawnListener(this);
+	}
+}

+ 63 - 63
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/player/TransformListener.java

@@ -1,63 +1,63 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
-
-import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jserver.gameserver.scripting.scriptengine.events.TransformEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * @author TheOne
- */
-public abstract class TransformListener extends L2JListener
-{
-	
-	/**
-	 * constructor
-	 * @param player
-	 */
-	public TransformListener(L2PcInstance player)
-	{
-		this.player = player;
-		register();
-	}
-	
-	/**
-	 * The player just transformed
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onTransform(TransformEvent event);
-	
-	/**
-	 * The player just untransformed
-	 * @param event
-	 * @return
-	 */
-	public abstract boolean onUntransform(TransformEvent event);
-	
-	@Override
-	public void register()
-	{
-		player.addTransformListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		player.removeTransformListener(this);
-	}
-	
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.player;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.scripting.scriptengine.events.TransformEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * @author TheOne
+ */
+public abstract class TransformListener extends L2JListener
+{
+	
+	/**
+	 * constructor
+	 * @param player
+	 */
+	public TransformListener(L2PcInstance player)
+	{
+		this.player = player;
+		register();
+	}
+	
+	/**
+	 * The player just transformed
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onTransform(TransformEvent event);
+	
+	/**
+	 * The player just untransformed
+	 * @param event
+	 * @return
+	 */
+	public abstract boolean onUntransform(TransformEvent event);
+	
+	@Override
+	public void register()
+	{
+		player.addTransformListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		player.removeTransformListener(this);
+	}
+	
+}

+ 52 - 52
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/talk/ChatFilterListener.java

@@ -1,52 +1,52 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.talk;
-
-import com.l2jserver.gameserver.network.clientpackets.Say2;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ChatEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * Listener to intercept player chat.<br>
- * Could be useful to improve or customize the integrated chat filters (i.e.: make it dependent on who's sending the message and the chat type... for example GMs could be unfiltered?).<br>
- * See Say2.java
- * @author TheOne
- */
-public abstract class ChatFilterListener extends L2JListener
-{
-	public ChatFilterListener()
-	{
-		register();
-	}
-	
-	/**
-	 * Allows for filtering the text
-	 * @param event
-	 * @return
-	 */
-	public abstract String onTalk(ChatEvent event);
-	
-	@Override
-	public void register()
-	{
-		Say2.addChatFilterListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		Say2.removeChatFilterListener(this);
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.talk;
+
+import com.l2jserver.gameserver.network.clientpackets.Say2;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ChatEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * Listener to intercept player chat.<br>
+ * Could be useful to improve or customize the integrated chat filters (i.e.: make it dependent on who's sending the message and the chat type... for example GMs could be unfiltered?).<br>
+ * See Say2.java
+ * @author TheOne
+ */
+public abstract class ChatFilterListener extends L2JListener
+{
+	public ChatFilterListener()
+	{
+		register();
+	}
+	
+	/**
+	 * Allows for filtering the text
+	 * @param event
+	 * @return
+	 */
+	public abstract String onTalk(ChatEvent event);
+	
+	@Override
+	public void register()
+	{
+		Say2.addChatFilterListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		Say2.removeChatFilterListener(this);
+	}
+}

+ 102 - 102
L2J_Server_BETA/java/com/l2jserver/gameserver/scripting/scriptengine/listeners/talk/ChatListener.java

@@ -1,102 +1,102 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.scripting.scriptengine.listeners.talk;
-
-import com.l2jserver.gameserver.network.clientpackets.Say2;
-import com.l2jserver.gameserver.scripting.scriptengine.events.ChatEvent;
-import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
-
-/**
- * Listener to intercept player chat.<br>
- * Useful to create customized chat log or any other use you can find for it.<br>
- * See network.Say2.java
- * @author TheOne
- */
-public abstract class ChatListener extends L2JListener
-{
-	public ChatListener()
-	{
-		register();
-	}
-	
-	/**
-	 * Notifies that the given text was sent from player1(origin) to a given target.<br>
-	 * @param event
-	 */
-	public abstract void onTalk(ChatEvent event);
-	
-	@Override
-	public void register()
-	{
-		Say2.addChatListener(this);
-	}
-	
-	@Override
-	public void unregister()
-	{
-		Say2.removeChatListener(this);
-	}
-	
-	/**
-	 * Defines the type of talk/chat taking place
-	 * @author TheOne
-	 */
-	public enum ChatTargetType
-	{
-		ALL,
-		SHOUT,
-		TELL,
-		PARTY,
-		CLAN,
-		GM,
-		PETITION_PLAYER,
-		PETITION_GM,
-		TRADE,
-		ALLIANCE,
-		ANNOUNCEMENT,
-		BOAT,
-		L2FRIEND,
-		MSNCHAT,
-		PARTYMATCH_ROOM,
-		PARTYROOM_COMMANDER,
-		PARTYROOM_ALL,
-		HERO_VOICE,
-		CRITICAL_ANNOUNCE,
-		SCREEN_ANNOUNCE,
-		BATTLEFIELD,
-		MPCC_ROOM
-	}
-	
-	/**
-	 * Returns the ChatTargetType based on the type (String) given.<br>
-	 * Default = ChatTargetType.ALL
-	 * @param type
-	 * @return
-	 */
-	public static ChatTargetType getTargetType(String type)
-	{
-		ChatTargetType targetType = ChatTargetType.ALL;
-		try
-		{
-			targetType = ChatTargetType.valueOf(type);
-		}
-		catch (Exception e)
-		{
-			log.info("Invalid ChatTargetType:" + type);
-			e.getMessage();
-		}
-		return targetType;
-	}
-}
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.scripting.scriptengine.listeners.talk;
+
+import com.l2jserver.gameserver.network.clientpackets.Say2;
+import com.l2jserver.gameserver.scripting.scriptengine.events.ChatEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;
+
+/**
+ * Listener to intercept player chat.<br>
+ * Useful to create customized chat log or any other use you can find for it.<br>
+ * See network.Say2.java
+ * @author TheOne
+ */
+public abstract class ChatListener extends L2JListener
+{
+	public ChatListener()
+	{
+		register();
+	}
+	
+	/**
+	 * Notifies that the given text was sent from player1(origin) to a given target.<br>
+	 * @param event
+	 */
+	public abstract void onTalk(ChatEvent event);
+	
+	@Override
+	public void register()
+	{
+		Say2.addChatListener(this);
+	}
+	
+	@Override
+	public void unregister()
+	{
+		Say2.removeChatListener(this);
+	}
+	
+	/**
+	 * Defines the type of talk/chat taking place
+	 * @author TheOne
+	 */
+	public enum ChatTargetType
+	{
+		ALL,
+		SHOUT,
+		TELL,
+		PARTY,
+		CLAN,
+		GM,
+		PETITION_PLAYER,
+		PETITION_GM,
+		TRADE,
+		ALLIANCE,
+		ANNOUNCEMENT,
+		BOAT,
+		L2FRIEND,
+		MSNCHAT,
+		PARTYMATCH_ROOM,
+		PARTYROOM_COMMANDER,
+		PARTYROOM_ALL,
+		HERO_VOICE,
+		CRITICAL_ANNOUNCE,
+		SCREEN_ANNOUNCE,
+		BATTLEFIELD,
+		MPCC_ROOM
+	}
+	
+	/**
+	 * Returns the ChatTargetType based on the type (String) given.<br>
+	 * Default = ChatTargetType.ALL
+	 * @param type
+	 * @return
+	 */
+	public static ChatTargetType getTargetType(String type)
+	{
+		ChatTargetType targetType = ChatTargetType.ALL;
+		try
+		{
+			targetType = ChatTargetType.valueOf(type);
+		}
+		catch (Exception e)
+		{
+			log.info("Invalid ChatTargetType:" + type);
+			e.getMessage();
+		}
+		return targetType;
+	}
+}