Coder Social home page Coder Social logo

core's Introduction

Implements some of the basic commands needed to run a simple server.

Commands

General

Command Permission Description
/about core.version Shows the server software version.
/ban core.ban Bans a player.
/clear core.clear Clears the inventory of a player.
/difficulty core.difficulty Changes the difficulty level of the world you're located in.
/deop core.unrank Add a player to the default rank.
/do core.do Runs a command as a player.
/effect core.effect Adds an effect to a player.
/enchant core.enchant Adds an enchantment to a specified player's held item.
/gamemode core.changegm Changes a player's gamemode.
/give core.give Gives an item to a player.
/help core.help Shows available commands.
/ienchant core.enchant.self Adds an enchantment to an item.
/item core.item Gives your player an item.
/kick core.kick Kicks a player.
/kill core.kill Kills a player.
/list core.list Shows a list of connected players.
/listgroups core.listgroups Shows a list of the available groups.
/listranks core.listranks Shows a list of the available ranks.
/me core.me Broadcasts what you are doing.
/motd core.motd Shows the message of the day.
/op core.rank Add a player to the administrator rank.
/plugins core.plugins Shows a list of the plugins.
/portal core.portal Moves your player to a different world.
/r core.tell Replies to the latest private message you received.
/rank core.rank Shows or sets a player's rank.
/regen core.regen Regenerates a chunk.
/reload core.reload Reloads all plugins.
/save-all core.save-all Saves all worlds.
/say core.say Sends a message in the chat to other players.
/seed core.seed Shows the seed of the given world name or current world, if not given.
/setspawn core.setspawn Changes the world's spawn point.
/spawn core.spawn Returns a player to the spawn point.
/spawnpoint core.spawnpoint Sets the spawn point for a player.
/stop core.stop Stops the server.
/sudo core.sudo Runs a command as a player, ignoring permissions.
/summon core.summon Summons an entity in the world.
/tell core.tell Sends a private message to a player.
/time Sets or displays the time.
/time add core.time.set Adds a given value to the current time.
/time day core.time.set Sets the time to day.
/time night core.time.set Sets the time to night.
/time query daytime core.time.query.daytime Displays the current time.
/time query gametime core.time.query.gametime Displays the amount of time elapsed since start.
/time set core.time.set Sets the time to a given value.
/toggledownfall core.toggledownfall Toggles the weather between clear skies and rain.
/tp core.teleport Teleports your player to another player.
/tps core.tps Returns the tps (ticks per second) from the server.
/unban core.unban Unbans a player.
/unrank core.unrank Add a player to the default rank.
/unsafegive core.give.unsafe Gives an item to a player, even if the item is blacklisted.
/unsafeitem core.item.unsafe Gives your player an item, even if the item is blacklisted.
/version core.version Shows the server software version.
/viewdistance core.viewdistance Changes your view distance.
/weather core.weather Changes the world's weather.
/whitelist Manages the whitelist.
/whitelist add core.whitelist Adds a player to the whitelist.
/whitelist list core.whitelist Shows a list of all players on the whitelist.
/whitelist off core.whitelist Turns whitelist processing off.
/whitelist on core.whitelist Turns whitelist processing on.
/whitelist remove core.whitelist Removes a player from the whitelist.
/worlds core.worlds Shows a list of all the worlds.

Permissions

Permissions Description Commands Recommended groups
core.ban /ban
core.changegm Allows players to change gamemodes. /gamemode admins
core.clear /clear
core.difficulty /difficulty
core.do /do
core.effect /effect
core.enchant Allows players to add an enchantment to a player's held item. /enchant admins
core.enchant.self Allows players to add an enchantment to their own held item. /ienchant admins
core.give Allows players to give items to other players. /give admins
core.give.unsafe Allows players to give items to other players, even if the item is blacklisted. /unsafegive none
core.help /help
core.item Allows players to give items to themselves. /item admins
core.item.unsafe Allows players to give items to themselves, even if the item is blacklisted. /unsafeitem none
core.kick /kick
core.kill /kill
core.list /list
core.listgroups /listgroups
core.listranks /listranks
core.me /me
core.motd /motd
core.plugins /plugins
core.portal /portal
core.rank /rank, /op
core.regen /regen
core.reload /reload
core.save-all /save-all
core.say /say
core.seed /seed
core.setspawn /setspawn
core.spawn /spawn
core.spawnpoint /spawnpoint
core.stop /stop
core.sudo /sudo
core.summon /summon
core.teleport /tp
core.tell /r, /tell
core.time.query.daytime Allows players to display the time of day. /time query daytime everyone
core.time.query.gametime Allows players to display how long the world has existed. /time query gametime
core.time.set Allows players to set the time of day. /time night, /time day, /time set, /time add admins
core.toggledownfall Allows players to toggle the weather between clear skies and rain. /toggledownfall admins
core.tps /tps
core.unban /unban
core.unrank /deop, /unrank
core.version /version, /about
core.viewdistance /viewdistance
core.weather Allows players to change the weather. /weather admins
core.whitelist Allows players to manage the whitelist. /whitelist off, /whitelist list, /whitelist remove, /whitelist on, /whitelist add admins
core.worlds /worlds

core's People

Contributors

12xx12 avatar 36451 avatar antoniobenedetti avatar archshift avatar bearbin avatar bond-009 avatar ccuser44 avatar daniel0916 avatar howaner avatar isavegas avatar jamestait avatar jonfabe avatar m10360 avatar madmaxoft avatar mathias-gh avatar mathiascode avatar mohe2015 avatar narroo avatar nilspace avatar omelj avatar peterbell10 avatar sammauldin avatar satoshinm avatar seadragon91 avatar stone3311 avatar taugeshtu avatar tigerw avatar tonitch avatar williamhatcher avatar worktycho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

core's Issues

Switch banlist and whitelist to UUIDs

With 1.8 coming, the banlist and whitelist should be changed to store UUIDs instead of names. It should probably still store the last known names together with those UUIDs, for informational purposes.

It would make sense to also change the underlying storage from an Ini file with poor performance and structurability into something more manageable and performant, such as SQLite.

/item and /give tries to spawn technical blocks, resulting in client crash

Whenever I try to give myself technical blocks on my server (for example the Bed Block, ID 26), the client crashes as technical blocks don't exist in item form anymore since 1.7. If I'm correct, 1.6 support for MCServer was removed recently, so is there a possibility to remove those items from the item list the /item and /give commands use?

I allow people on my server to use these commands, and some of them may try to get technical blocks, without knowing that their clients will crash.

Running some commands in console produces errors

running commands like tps and weather in the server console produces errors that it didn't in previous versions. Console output below /
tps:

[15:57:55] Executing console command: "tps"
[15:57:55] LUA: Plugins/Core/tps.lua:6: attempt to call method 'SendMessageInfo' (a nil value)
[15:57:55] Stack trace:
[15:57:55] Plugins/Core/tps.lua(6): (no name)
[15:57:55] Stack trace end
[15:57:55] Error in plugin Core calling function ()
[15:57:55] Unknown command, type 'help' for all commands.

weather:

[15:58:24] Executing console command: "weather"
[15:58:24] LUA: Plugins/Core/functions.lua:175: attempt to call method 'GetWorld' (a nil value)
[15:58:24] Stack trace:
[15:58:24] Plugins/Core/functions.lua(175): GetWorld
[15:58:24] Plugins/Core/weather.lua(50): (no name)
[15:58:24] Stack trace end
[15:58:24] Error in plugin Core calling function ()
[15:58:24] Unknown command, type 'help' for all commands

Implement translations.

Now that the TransAPI plugin is in MCServer core, it would be good to implement translations.

We need both people to put in the translation functions, and people who know languages to do the translations.

Core should use Info.lua

Most plugins are starting to use the info.lua file to register command. We should do that as well.

Core crashes the server with the latest MCS

[22:11:32] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:32] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:33] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:33] Function 'getSpawnProtectRadius' not found
[22:11:34] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:34] Function 'getSpawnProtectRadius' not found
[22:11:34] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:34] Function 'getSpawnProtectRadius' not found
[22:11:34] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:34] Function 'getSpawnProtectRadius' not found
[22:11:34] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:34] Function 'getSpawnProtectRadius' not found
[22:11:34] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:34] Function 'getSpawnProtectRadius' not found
[22:11:34] Error in plugin Core: Could not find function getSpawnProtectRadius()
[22:11:34] Function 'getSpawnProtectRadius' not found

Usability: Manage connected players' groups in webadmin

I'd like to see something like the Players and Permissions tabs mixed together - list the players currently connected to the server and allow the admin to change their groups easily. The current state involves copying the player name into the group-change edit-box, that's too much work.

LimitWorld settings in the wrong place in settings.ini

LimitWorld settings are now saved into the [Worlds] section of the settings.ini. That section is reserved to have only the world definitions, each line is supposed to be a separate world.

The settings should move to the world.ini, since the LimitWorld should be a per-world feature.

Add /sudo and /do.

They are some useful commands! (Easy to do, I shall do it soon ๐Ÿ˜„)

Kicked for not being on the whitelist

[18:13:42] antoniobenedetti tried to join, but is not on the whitelist.
[18:13:48] Lucifer tried to join, but is not on the whitelist.
[18:13:54] Lucifer tried to join, but is not on the whitelist.
[18:14:12] Lucifer tried to join, but is not on the whitelist.

We are both on the whitelist, however we are both being kicked for not being on the whitelist.

Worlds being removed from settings.ini on save in webadmin

In the ServerSettings -> Worlds section, if you press Save Settings it will wipe out your default world from your settings.ini file, additionally using the add world section will wipe out any additional worlds from your settings.ini file, leaving only the newly added world.

Licensing

The repo has no licensing info atm, and it needs some for easy contribution information.

I assume that it takes the license from the root MCServer project, but if it's different we need to decide.

Repairing items creates error in console

Already tried to fix it, but had not success. Clear grid - not working, set slots to emtpy item - also not working :-(

[20:28:22] LUA: Plugins/Core/itemrepair.lua:197: error in function 'SetIngredient'.
     argument #2 is 'nil'; 'number' expected.

[20:28:22] Stack trace:
[20:28:22]   [C](-1): SetIngredient
[20:28:22]   Plugins/Core/itemrepair.lua(197): (no name)
[20:28:22] Stack trace end
[20:28:22] Error in plugin Core calling function <callback>()

Semicolon and other style conventions.

I assume that this repo should be using tabs for indentation and spaces for alignment, and unix line endings. Should we be using semicolons at the end of lines (they're optional) as they seem to have mixed use in the repo. Also, if there are any other lua conventions that must be followed, please tell me ๐Ÿ˜„

LimitWorld cannot be turned off

Although I have turned off the LimitWorld feature (why is it even on by default???) and it says Off both in the webadmin and in the ini file, I am still not allowed to go further away from the world's spawn.

Add symbolic names to /gm command

0, 1 and 2 are not exactly user-friendly names for the game modes; add common symbolic names to the /gm command handler so that it can recognize gamemode names, too: /gm survival, /gm creative, /gm adventure

Webadmin chat doesn't linkify URLs with slashes in them

If an URL has a slash in it, the webadmin chat viewer doesn't linkify it.

Rewrite the chat to:
1, Use pattern matching to linkify the URLs
2, Move the linkification to when the message is received from the OnChat hook, to avoid linkifying on every page load.

/plugins command is broken

After updating MCServer to the latest version, the /plugins command has stopped working.

This error appears in the console:

[13:59:03] Stack trace:
[13:59:03]   [C](-1): GetAllPlugins
[13:59:03]   Plugins/Core/plugins.lua(3): (no name)
[13:59:03] Stack trace end
[13:59:04] PluginManager:GetAllPlugins() is no longer available, use cPluginManager:ForEachPlugin() instead

PluginList web tab enhancements

Currently the plugin list web tab displays all the plugins, sorted, enabled first, then by alphabet.

It should display two separate lists, the top should be enabled plugins, in the order in which they're started, along with buttons to move them up or down. Then below that another list, for disabled plugins, that would be sorted alphabetically.

Implement a helpsearch command

This command, used as /helpsearch <text>, will search all the commands that the user has permissions to execute for the occurrence of in either the command name or its help string.

This is useful for discovering commands - if a player wants to know what commands deal with teleporting, they ask /helpsearch teleport, and all commands containing "teleport" will be listed, together with their help strings.

(Idea) Clickable links

There should be a permission node for clickable links in the chat. By default MCS has no clickable links, they cannot be clicked to get the browser window open.

/i and /item

The /i and /item should come back. It was realy easy to get items by using /i {Item} (Amount)

Web chat should have timestamps

The messages in web chat should have timestamps and the webchat page should have a current server time, so that the age of the messages is known.

/give command does not work.

It always reports that the item is invalid, even though it is correct. It could however be the fault of the API.

core.back permission doesn't work

There seems to be a problem with the core.back permission. I've added it to the "Default" group, but it still returns a "Forbidden command; insufficient privileges: "/back"" message in-game.

Getversion and Setversion console commands

The getversion and setversion console commands no longer work. It appears that the underlying API calls that they relied upon no longer exist. Can these be safely removed? Additionally, if these can be removed, should the Shown Version option on the Server Settings webadmin page also be removed?

Add console commands to manipulate ranks / groups / permissions

We should have a full set of commands to manipulate ranks, groups and permissions so that people don't need to use webadmin to edit ranks.
Proposed commands:
addrank <rankname>
delrank <rankname> [<replacementrankname>]
renamerank <oldname> <newname>
addgroup <groupname>
delgroup <groupname>
renamegroup <oldname> <newname>
addpermission <groupname> <permission>
delpermission <groupname> <permission>
addrankgroup <rankname> <groupname>
delrankgroup <rankname> <groupname>
listranks
listgroups <rankname>
listpermissions <groupname>
listrankpermissions <rankname>

Marking as easy since most of these map directly to API calls, so the command handlers should be pretty easy to write.
Best place for the handlers would be the ranks.lua file; don't forget to use the Info.lua file to register and document them.

attempt to index global 'OtherPlayer' (a nil value)

[18:16:05] LUA: 2 - Plugins/Core/functions.lua:144: attempt to index global 'OtherPlayer' (a nil value)
[18:16:06] LUA: 2 - Plugins/Core/functions.lua:144: attempt to index global 'OtherPlayer' (a nil value)

Fix web plugin management

Using the webadmin's "Manage Plugins" tab seems to break the settings.ini file, random plugins are removed from it. This may be a result of changes in MCServer's cIniFile API (AddValue() vs SetValue())

core.tpa is not working

Got reports of forbidden command error for /tpa but the group already has core.tpa permission node. As admin with '*' permissions i don't have this issue.

Update AddHook to match the new API

AddHook API has changed and the format used in Core is deprecated now. It needs an update to the new API to keep the server from complaining.

core.pluginlist is not working

Some players reported forbidden error on /plugins command while they have the core.pluginlist permission. I'm in the admin group with '*' permissions, so have no problem using /plugins.

This only affects normal players, not admins.

Webadmin group list doesn't wrap

The group list in the webadmin's "Permissions" tab doesn't wrap, so when the group contains too many permissions, it scrolls off the screen and breaks the page layout.
webadmin_permissions

PlayerList web tab doesn't work

The PlayerList web tab produces the following error in the server console:

[0900|23:15:24] LUA: 2 - Plugins/Core/web_playerlist.lua:18: attempt to call method 'GetNumPlayers' (a nil value)
[0900|23:15:24] Error in plugin Core calling function <callback>()

The web tab displays "Lua encountered error while processing the page request"

Configureable /time animation

Currently when you use the /time <Time> command you get an animation (The sun moves faster to the given time). Some people might want the time to change Instantaneously. This should be configureable in the core's config file.

WorldLimiter Nil Compare issue

When a player joins the server, the for loop on line 3 of wordlimiter.lua throws the following error:
[TIME] LUA: 2 - Plugins/Core/worldlimiter.lua:3: attempt to compare number with nil
[TIME] Error in plugin Core calling function OnPlayerMoving()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.