Cuberite Forum
GameRule Plugin - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Releases (https://forum.cuberite.org/forum-2.html)
+---- Forum: Archived Plugins (https://forum.cuberite.org/forum-18.html)
+---- Thread: GameRule Plugin (/thread-2995.html)



GameRule Plugin - psyFi - 08-07-2017

Aims to mimic official  Minecraft's /gamerule command

Why this exists?
As awesome as Cuberite is, it has not implemented the standard game rules we're all used to like keepInventory and mobGreifing. This plugin will try to fill in that missing functionality.  

Work in Progress
This plugin is not finished yet. We need your help implementing all the standard game rules! Check out the GitHub repo to see how you can contribute!

Game Rule Descriptions
Here's a list of the included (not necessarily implemented) game rules and what they (should) do:
  • commandBlockOutput - Whethercommandblocksshouldnotifyadminswhentheyperformcommands
    • Not implemented Default value: true Value Type: boolean
  • disableElytraMovementCheck - Whethertheservershouldskipcheckingplayerspeedwhentheplayeriswearingelytra.Oftenhelpswithjitteringduetolaginmultiplayer,butmayalsobeusedtotravelunfairlylongdistancesinsurvivalmode(cheating)
    • Not implemented Default value: false Value Type: boolean
  • doEntityDrops - Whetherentitiesthatarenotmobsshouldhavedrops
    • Not implemented Default value: true Value Type: boolean
  • doFireTick - Whetherfireshouldspreadandnaturallyextinguish
    • Not implemented Default value: true Value Type: boolean
  • doLimitedCrafting - Whetherplayersshouldonlybeabletocraftrecipesthatthey'veunlockedfirst
    • Not implemented Default value: false Value Type: boolean
  • doMobLoot - Whethermobsshoulddropitems
    • Not implemented Default value: true Value Type: boolean
  • doMobSpawning - Whethermobsshouldnaturallyspawn.Doesnotaffectmonsterspawners.
    • Not implemented Default value: true Value Type: boolean
  • doTileDrops - Whetherblocksshouldhavedrops
    • Not implemented Default value: true Value Type: boolean
  • doWeatherCycle - Whethertheweatherwillchange
    • Not implemented Default value: true Value Type: boolean
  • gameLoopFunction - Thefunctiontoruneverygametick
    • Not implemented Default value: - Value Type: string
  • keepInventory - Whethertheplayershouldkeepitemsintheirinventoryafterdeath
    • Not implemented Default value: false Value Type: boolean
  • logAdminCommands - Whethertologadmincommandstoserverlog
    • Not implemented Default value: true Value Type: boolean
  • maxCommandChainLength - Determinesthenumberatwhichthechaincommandblockactsasa"chain"
    • Not implemented Default value: 65536 Value Type: number
  • maxEntityCramming - Themaximumnumberofotherpushableentitiesamoborplayercanpush,beforetaking3suffocationdamageperhalf-second.Settingto0disablestherule.Damageaffectssurvival-modeoradventure-modeplayers,andallmobsbutbats.Pushableentitiesincludenon-spectator-modeplayers,anymobexceptbats,aswellasboatsandminecarts
    • Not implemented Default value: 24 Value Type: number
  • mobGriefing - Whethercreepers,zombies,endermen,ghasts,withers,enderdragons,rabbits,sheep,andvillagersshouldbeabletochangeblocksandwhethervillagers,zombies,skeletons,andzombiepigmencanpickupitems
    • Not implemented Default value: true Value Type: boolean
  • naturalRegeneration - Whethertheplayercanregeneratehealthnaturallyiftheirhungerisfullenough(doesn'taffectexternalhealing,suchasgoldenapples,theRegenerationeffect,etc.)
    • Not implemented Default value: true Value Type: boolean
  • randomTickSpeed - Howoftenarandomblocktickoccurs(suchasplantgrowth,leafdecay,etc.)perchunksectionpergametick.0willdisablerandomticks,highernumberswillincreaserandomticks.settingtoahighintegerresultsinhighspeedsofdecayandgrowth
    • Not implemented Default value: 3 Value Type: number
  • reducedDebugInfo - Whetherthedebugscreenshowsallorreducedinformation;andwhethertheeffectsofF3+B(entityhitboxes)andF3+G(chunkboundaries)areshown
    • Not implemented Default value: false Value Type: boolean
  • sendCommandFeedback - Whetherthefeedbackfromcommandsexecutedbyaplayershouldshowupinchat.Alsoaffectsthedefaultbehaviorofwhethercommandblocksstoretheiroutputtext
    • Not implemented Default value: true Value Type: boolean
  • spawnRadius - Thenumberofblocksoutwardfromtheworldspawncoordinatesthataplayerwillspawninwhenfirstjoiningaserverorwhendyingwithoutaspawnpoint
    • Not implemented Default value: 10 Value Type: number


Thanks to the Minecraft Wiki for providing descriptions of the game rules!

Commands

General
  • /gamerule - Sets or queries a game rule valuePermission required: gamerule


Debug
  • /grdbclose - DEBUG ONLY - Close all databases opend by GameRule pluginPermission required: gamerule.debug


Permissions
  •  - gamerule - Ability to run command, set and query game rule values
    • Commands affected:- /gamerule - /gamerule doLimitedCrafting - /gamerule maxCommandChainLength - /gamerule disableElytraMovementCheck - /gamerule doMobLoot - /gamerule naturalRegeneration - /gamerule spawnRadius - /gamerule randomTickSpeed - /gamerule mobGriefing - /gamerule doFireTick - /gamerule doMobSpawning - /gamerule doWeatherCycle - /gamerule doTileDrops - /gamerule commandBlockOutput - /gamerule spectatorsGenerateChunks - /gamerule sendCommandFeedback - /gamerule doEntityDrops - /gamerule maxEntityCramming - /gamerule logAdminCommands - /gamerule reducedDebugInfo - /gamerule gameLoopFunction - /gamerule keepInventory
    • Recommended groups: admin
     - gamerule.debug - Access to gamerule debug commands
    • Commands affected:- /grdbclose
    • Recommended groups: debug, developer



RE: GameRule Plugin - Mathias - 08-07-2017

Maybe this should be merged into the Core plugin at some point in the future? The Core plugin contains the default commands of Cuberite.


RE: GameRule Plugin - xoft - 08-07-2017

This will most likely need further support from the C++ side of things, many gamerules require changes in the underlying code.


RE: GameRule Plugin - psyFi - 08-08-2017

Considering that none of the game rules have actually been implemented, there's a long way to go. I imagine this plugin will be a test against the Lua API.


RE: GameRule Plugin - xoft - 08-08-2017

If it hasn't been implemented at all, consider moving the code over to the Core plugin, as Mathias already mentioned - it's kinda default functionality.


RE: GameRule Plugin - psyFi - 08-09-2017

Can we please make a new branch called gamerule


RE: GameRule Plugin - bearbin - 08-09-2017

With git, you can create new branches yourself, in your own fork. When the code is done, just submit a pull request to get it merged.


RE: GameRule Plugin - psyFi - 08-10-2017

I've reworked the gamerule command, and submitted a pull request.
Right now it only implements the command, not the behavior of the game rules.