Coder Social home page Coder Social logo

samueljtaylor / simplecommands Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 293 KB

Minecraft fabric mod for server commands (20w15a and above)

License: MIT License

Java 100.00%
fabricmc fabricmc-mod minecraft minecraft-mod minecraft-server commands

simplecommands's Introduction

SimpleCommands

No Maintenance Intended

Server commands for Fabric 1.17

Originally a fork of Markus23/mycommands

  1. Changes
  2. Commands
  3. Config

Changes

v1.0.3-1.17

  • Fix cross dimensional travel

v1.0.0-1.17

  • Complete rewrite of mod
  • Renamed from TaylorCommands to SimpleCommands
  • Removed /rndtp command
  • Allowed for each world to have their own warps and homes save file
  • Updated to 1.17
  • Added suicide command
  • Fixed cross-dimensional travel

v0.3.1-20w19a.01

  • Updated version to 20w19a snapshot

v0.3.1-20w18a.01

  • Updated code for 20w18a snapshot

v0.3.0-20w16a.01

  • Added /listall command to list warps and homes
    • /listall will list the default list in config
    • /listall home will list all the player's homes
    • /listall warp will list all the server's warps
    • Aliases for each are home, homes, h for homes and warp, warps, w for warps
  • If you're having trouble with this command, you'll need to either delete your config file to allow a new one to be created or add the settings to the bottom of your existing, see /listall settings

v0.2.0-20w16a.01

  • Redesigned the config file so you should delete your current one to allow the new one to be created
  • Added console logging, customizable in the config
  • Added ability to make some commands enabled/disabled or OP Only

Commands

Home

Delete a home

/delhome

Warp to a set home

/home

Set a home

/sethome

List all homes

/listall homes

Teleport

Back to previous location

/back

Request to teleport

/tpa

Accept a teleport request

/tpaccept

Deny a teleport request

/tpdeny

Warp

Delete a warp

/delwarp

Warp to the spawn

/spawn

Set the spawn warp

/setspawn

Set a warp

/setwarp

Warp to a warp point

/warp

List all warps

/listall warps

Health

Restore full health and hunger

/heal

Items

Repair item in hand

/repair

Weather/Time

Set to daytime

/day

Set weather to raining

/rain

Set weather to sunny

/sun

Player

Enable flying (like in creative)

/fly

Make player invulnerable

/god

Commit Suicide

/suicide

Config

Commands Config

Each command can be toggled as enabled, disabled or opOnly in the config.

  • enabled commands all players can use
  • opOnly commands only players that are OP status can use
  • disabled commands nobody can use

The config is laid out as follows:

{
	"commands": {
		"fly": {
			"enabled": true,
			"opOnly": false
		}
	}
}

Note: opOnly commands must have both enabled and opOnly set to true

Logging

By default only opOnly commands are logged in the console, to log all commands, set the player value to true

{
	"log": {
		"opOnly": true,
		"player": true,
		"includeModName": false
	}
}

opOnly will log the commands that have opOnly: true and player will log anything that has opOnly: false

The includeModName setting will prepend [TaylorCommands] before the logging output.

Additional Settings

Some commands have additional settings

/sethome
{
	"sethome": {
		"enabled": true,
		"opOnly": false,
		"max": 5
	}
}

In this case max refers to the maximum number of homes a player can have, feel free to customize.

/listall
{
	"listall": {
		"enabled": true,
		"opOnly": false,
		"defaultList": "warp"
	}
}

If /listall is provided with no argument the defaultList will be used.

simplecommands's People

Contributors

cdagaming avatar itssamtaylor avatar markus23 avatar xuyuere avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

cdagaming

simplecommands's Issues

Commands do not work on server; crashes in singleplayer

crash-2020-05-01_16.26.14-server.txt
crash-2020-05-01_16.21.16-server.txt
These first two are from my single player attempts, and also show me joining my server.
latest.log
And the latest.log is from my server. I'm not entirely certain what is happening, but The commands simply do not work, and the chat tells me that the command is invalid. This is from the latest version of your mod.
And whenever I attempt to load up a singleplayer world, it just crashes.

In singleplayer, homes and warps are saved in the game folder instead of the world folder

This causes homes and warps to carry over into other worlds where they may not always make sense.

image

I don't make fabric mods, but I assume there is a better way to get the config location than this?

https://github.com/samueljtaylor/TaylorCommands/blob/e31ea6afcd0b9a807cf1c2dccd7be38b1b90761d/src/main/java/ca/samueltaylor/taylor_commands/TaylorCommands.java#L145-L147

Just a note, this is in 1.17 using the build artifact from here.

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.