use list(x) instead of x.tolist()
This commit is contained in:
@@ -25,7 +25,7 @@ def msg(player, text, usecolor = True, basecolor = None):
|
||||
# bukkit only works with permissibles that are subscribed to perm
|
||||
def broadcast(perm, text):
|
||||
text = colorify(text)
|
||||
for recipient in server.getOnlinePlayers().tolist() + [server.getConsoleSender()]:
|
||||
for recipient in list(server.getOnlinePlayers()) + [server.getConsoleSender()]:
|
||||
(not perm or recipient.hasPermission(perm)) and msg(recipient, text)
|
||||
|
||||
def colorify(text):
|
||||
|
||||
2
misc.py
2
misc.py
@@ -206,7 +206,7 @@ def onDonateCommand(sender, args):
|
||||
@hook.command("pluginversions")
|
||||
def onPluginversionsCommand(sender, args):
|
||||
plugHeader(sender, "Plugin versions")
|
||||
plugins = server.getPluginManager().getPlugins().tolist()
|
||||
plugins = list(server.getPluginManager().getPlugins())
|
||||
plugins.sort(key=lambda pl: pl.getName())
|
||||
msg(sender, "&3Listing all " + str(len(plugins)) + " plugins and their version:")
|
||||
for plugin in plugins:
|
||||
|
||||
Reference in New Issue
Block a user