mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 22:19:40 +00:00
Large Cleanup to Code Imports and Formatting
This commit is contained in:
1 parent
31aac0d6b3
commit
a9b602713c
155 files changed
+4089
-2194
No files matched your search
@@ -11,13 +11,13 @@ import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* Reusable IScriptHandler implementation for objects that own an optional single JaninoScript unit.
|
||||
*
|
||||
* <p>
|
||||
* This is meant for "function provider" scripts (not EnumScriptType driven). Execution is typically
|
||||
* initiated by the owning system calling script.call(...) directly.
|
||||
*
|
||||
* <p>
|
||||
* NBT storage is kept under the parent compound key "Script" (same convention as JaninoScriptable).
|
||||
*/
|
||||
public class JaninoScriptHandler<S extends JaninoScript<?>> extends ScriptHandler {
|
||||
public class JaninoScriptHandler<S extends JaninoScript<?>> extends ScriptHandler {
|
||||
|
||||
protected S script;
|
||||
|
||||
@@ -41,9 +41,9 @@ public class JaninoScriptHandler<S extends JaninoScript<?>> extends ScriptHandle
|
||||
}
|
||||
|
||||
public JaninoScript createScript() {
|
||||
if (script == null)
|
||||
if (script == null)
|
||||
script = factory.get();
|
||||
|
||||
|
||||
return script;
|
||||
}
|
||||
|
||||
@@ -96,9 +96,9 @@ public class JaninoScriptHandler<S extends JaninoScript<?>> extends ScriptHandle
|
||||
|
||||
@Override
|
||||
public List<IScriptUnit> getScripts() {
|
||||
if (script == null)
|
||||
if (script == null)
|
||||
return Collections.emptyList();
|
||||
|
||||
|
||||
return Collections.<IScriptUnit>singletonList(script);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user