Cleaned up documentation, added lacking Java annotations.

This commit is contained in:
sk89q
2011-02-18 15:49:50 -08:00
parent e5a25496b2
commit e94c1d4874
49 changed files with 269 additions and 140 deletions

View File

@@ -134,7 +134,6 @@ public class CraftScriptContext extends CraftScriptEnvironment {
/**
* Checks to make sure that there are enough but not too many arguments.
*
* @param args
* @param min
* @param max -1 for no maximum
* @param usage usage string
@@ -179,6 +178,8 @@ public class CraftScriptContext extends CraftScriptEnvironment {
*
* @param list
* @return pattern
* @throws UnknownItemException
* @throws DisallowedItemException
*/
public Pattern getBlockPattern(String list)
throws UnknownItemException, DisallowedItemException {
@@ -191,6 +192,8 @@ public class CraftScriptContext extends CraftScriptEnvironment {
* @param list
* @param allBlocksAllowed
* @return set
* @throws UnknownItemException
* @throws DisallowedItemException
*/
public Set<Integer> getBlockIDs(String list, boolean allBlocksAllowed)
throws UnknownItemException, DisallowedItemException {

View File

@@ -28,12 +28,14 @@ public class RhinoContextFactory extends ContextFactory {
this.timeLimit = timeLimit;
}
@Override
protected Context makeContext() {
RhinoContext cx = new RhinoContext(this);
cx.setInstructionObserverThreshold(10000);
return cx;
}
@Override
protected void observeInstructionCount(Context cx, int instructionCount) {
RhinoContext mcx = (RhinoContext)cx;
long currentTime = System.currentTimeMillis();
@@ -43,6 +45,7 @@ public class RhinoContextFactory extends ContextFactory {
}
}
@Override
protected Object doTopCall(Callable callable, Context cx, Scriptable scope,
Scriptable thisObj, Object[] args) {
RhinoContext mcx = (RhinoContext)cx;