Commit Graph

14 Commits

Author SHA1 Message Date
Dico200
1750c82208 Changed all CommandExecutor arguments
Added arguments command and label to all command executor functions,
hopefully for massive performance increase.

This is due to the following mess in PythonLoader:
``` Java
@Override
public boolean onCommand(CommandSender sender, Command command, String
label, String[] args) {
boolean result;
if (argcount == -1) {
try {
result = call(4, sender, command, label, args);
argcount = 4;
} catch (PyException e) {
//this could goof up someone ... they'll probably yell at us and
eventually read this code ... fuck them
if (e.type == Py.TypeError && (e.value.toString().endsWith("takes
exactly 3 arguments (4 given)") || e.value.toString().endsWith("takes
exactly 4 arguments (5 given)"))) {
result = call(3, sender, command, label, args);
argcount = 3;
} else if (e.type == Py.TypeError && (e.value.toString().endsWith("takes
exactly 2 arguments (4 given)") || e.value.toString().endsWith("takes
exactly 3 arguments (5 given)"))) {
result = call(2, sender, command, label, args);
argcount = 2;
} else {
throw e;
}
}
} else {
result = call(argcount, sender, command, label, args);
}
return result;
}
```

Note: Still WIP on reports - I'm working on making it keep solved
reports to fix issue 10
2015-03-19 23:51:33 +01:00
jomo
9a916ed2cd change indentation from 2 spaces to 4, fix #5 2015-01-06 23:38:42 +01:00
jomo
34e703bb3e forgot to import thread 2014-08-07 03:31:47 +02:00
jomo
1238ca66f3 more threading / offlineplayer fixes 2014-08-07 02:53:24 +02:00
jomo
6d04f31a8c get rid of offlineplayer in friends 2014-08-07 02:24:45 +02:00
jomo
363f5cddda remove WTF methods from player welcome 2014-08-07 02:19:53 +02:00
jomo
28d0182496 FIX THIS BEFORE MERGING! 2014-07-31 00:07:15 +02:00
jomo
63810a0782 better name + docs for played_before (renamed to known_player) 2014-07-27 22:44:12 +02:00
jomo
e9b0ad656b add path to save/open json file 2014-07-27 06:04:31 +02:00
jomo
d58d975910 add default to open_json_file 2014-07-27 06:01:52 +02:00
jomo
bdabfc0054 clean up friends.py 2014-07-24 02:12:54 +02:00
Dico
aafac2fe5a Minor change 2014-07-23 01:04:53 +02:00
Dico
8751123f8c Removed useless lines 2014-07-23 00:56:31 +02:00
Dico
1cba2f9db9 Didn't add module last time...? 2014-07-23 00:55:32 +02:00