SteamWar/BauSystem
Archiviert
13
0

Hotfix WE security issue

Dieser Commit ist enthalten in:
Lixfel 2020-12-11 15:19:15 +01:00
Ursprung 0f03e2b0a9
Commit e901568a07

Datei anzeigen

@ -48,7 +48,7 @@ public class ScriptListener implements Listener {
BookMeta meta = (BookMeta) item.getItemMeta(); BookMeta meta = (BookMeta) item.getItemMeta();
for(String page : meta.getPages()){ for(String page : meta.getPages()){
for(String command : page.split("\n")){ for(String command : page.split("\n")){
PlayerCommandPreprocessEvent preprocessEvent = new PlayerCommandPreprocessEvent(player, command); PlayerCommandPreprocessEvent preprocessEvent = new PlayerCommandPreprocessEvent(player, "/" + command);
Bukkit.getServer().getPluginManager().callEvent(preprocessEvent); Bukkit.getServer().getPluginManager().callEvent(preprocessEvent);
if(preprocessEvent.isCancelled()) if(preprocessEvent.isCancelled())
continue; continue;