1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-08 08:23:11 +00:00

Item template structure

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-14 20:11:42 -03:00
parent e886165b89
commit fe41dbdc6f
59 changed files with 1400 additions and 85 deletions

View File

@@ -59,6 +59,11 @@ public class ScriptTemplateService extends AbstractService implements
public void addTemplate(Class<? extends Template<?>> t) {
final Template<?> template = injector.getInstance(t);
if (templates.containsKey(template.getID()))
throw new TemplateException("Template with ID" + template.getID()
+ " is already registered for "
+ templates.get(template.getID()));
if (template.getID() != null)
templates.put(template.getID(), template);
}

View File

@@ -0,0 +1,21 @@
package com.l2jserver.service.game.template;
public class TemplateException extends RuntimeException {
private static final long serialVersionUID = 1L;
public TemplateException() {
super();
}
public TemplateException(String message, Throwable cause) {
super(message, cause);
}
public TemplateException(String message) {
super(message);
}
public TemplateException(Throwable cause) {
super(cause);
}
}