mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-08 08:23:11 +00:00
Change-Id: I0000000000000000000000000000000000000000
Change-Id: Idb54de2399013c159bda588be1ce065b8314af60 Change-Id: I8b913da4fe5139078b935b99e8e1aaa091480a75
This commit is contained in:
@@ -51,8 +51,9 @@ public class StaticTemplateService extends AbstractService implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public Template getTemplate(TemplateID id) {
|
||||
return templates.get(id);
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T extends Template> T getTemplate(TemplateID<T> id) {
|
||||
return (T) templates.get(id);
|
||||
}
|
||||
|
||||
public void addTemplate(Class<? extends Template> t) {
|
||||
|
||||
@@ -8,11 +8,13 @@ public interface TemplateService extends Service {
|
||||
/**
|
||||
* Get the template assigned with <tt>id</tt>
|
||||
*
|
||||
* @param <T>
|
||||
* the template type
|
||||
* @param id
|
||||
* the template id
|
||||
* @return the template matching the id
|
||||
* @return the template
|
||||
*/
|
||||
Template getTemplate(TemplateID id);
|
||||
<T extends Template> T getTemplate(TemplateID<T> id);
|
||||
|
||||
/**
|
||||
* Reload the template list.
|
||||
|
||||
Reference in New Issue
Block a user