GameRule Plugin
#1
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
Reply
Thanks given by:
#2
Maybe this should be merged into the Core plugin at some point in the future? The Core plugin contains the default commands of Cuberite.
Reply
Thanks given by:
#3
This will most likely need further support from the C++ side of things, many gamerules require changes in the underlying code.
Reply
Thanks given by:
#4
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.
Reply
Thanks given by:
#5
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.
Reply
Thanks given by:
#6
Can we please make a new branch called gamerule
Reply
Thanks given by:
#7
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.
Reply
Thanks given by:
#8
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.
Reply
Thanks given by:




Users browsing this thread: 5 Guest(s)