Merge pull request 'Add Comments to scripts' (#135) from ScriptComments into master
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
e0060deca4
@ -48,6 +48,8 @@ public class ScriptListener implements Listener {
|
||||
BookMeta meta = (BookMeta) item.getItemMeta();
|
||||
for(String page : meta.getPages()){
|
||||
for(String command : page.split("\n")){
|
||||
if (command.startsWith("#")) continue;
|
||||
|
||||
PlayerCommandPreprocessEvent preprocessEvent = new PlayerCommandPreprocessEvent(player, "/" + command);
|
||||
Bukkit.getServer().getPluginManager().callEvent(preprocessEvent);
|
||||
if(preprocessEvent.isCancelled())
|
||||
@ -68,4 +70,5 @@ public class ScriptListener implements Listener {
|
||||
return ScriptListener_15.isNoBook(item);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren