Skip to content

Commit

Permalink
chore: Readme Update
Browse files Browse the repository at this point in the history
  • Loading branch information
CoasterFreakDE committed Jun 12, 2024
1 parent a250d9d commit 6b5d559
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
31 changes: 12 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,24 @@ If you run into any issues,
* All drives have a type limit set at 64, 128, 256 or 512. This means that only this amount of different item types
can be added to a single drive.
* Can be changed in config.
* ES System
* The ES System is what keeps the drives inside it and is used to access the items stored on the drives.
* You can trust players into the system; they will have just as much access as you do.
* Only the system owner can trust players.
* If you have Lands installed, you can trust areas to access the system.
* Public ES Systems:
* **_Anybody_** will have access to take items from the system.
* Only trusted players and the owner of the system can destroy it.
* DiskDrive
* Terminal
* NetworkCore
* Importer
* Exporter
* *More info coming soon*

## Permissions

* `energeticstorage.*`: Gives all Energetic Storage permissions. Default: `op`
* `energeticstorage.reload`: Gives permission to reload the Energetic Storage configuration files. Default: `op`
* `energeticstorage.esgive`: Gives permission to give an Energetic Storage item to themselves. Default: `op`
* `energeticstorage.esgive.others`: Gives permission to give an Energetic Storage item to others. Default: `op`
* `energeticstorage.system.open.untrusted`: Gives permission to open an ES System that the player is not trusted on.
Default: `op`
* `energeticstorage.system.create`: Gives permission to create an ES System. Default: `Everyone`
* `energeticstorage.system.destroy.untrusted`: Gives permission to destroy a system the player isn't trusted on.
Default: `op`
* `energeticstorage.give`: Gives permission to give an Energetic Storage item to themselves. Default: `op`
* `energeticstorage.give.others`: Gives permission to give an Energetic Storage item to others. Default: `op`
* `energeticstorage.debug`: Gives permission to toggle debug mode. Default: `op`

## Commands

* /esreload
* /esgive [1k, 4k, 16k, 64k, system] (player)
* `/esdebug`: Toggles debug mode.
* `/esgive <item> [player]` : Gives an Energetic Storage item to the player. If no player is specified, it gives it to the
command sender.

## Config:

Expand Down
8 changes: 7 additions & 1 deletion src/main/kotlin/com/liamxsage/energeticstorage/Variables.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.liamxsage.energeticstorage

import org.bukkit.NamespacedKey
import org.bukkit.permissions.Permission
import org.bukkit.permissions.PermissionDefault

const val PREFIX = "<gradient:#0984e3:#74b9ff>Energetic Storage</gradient> <color:#4a628f>>></color> <color:#b2c2d4>"
const val BLOCK_PREFIX =
Expand All @@ -20,4 +22,8 @@ val GUI_FIXED_ITEM_NAMESPACE = NamespacedKey(EnergeticStorage.instance, "gui_fix

val PLAYER_DEBUG_MODE_NAMESPACE = NamespacedKey(EnergeticStorage.instance, "debug_mode")

var MAX_NETWORK_LENGTH = 512
var MAX_NETWORK_LENGTH = 512


// Permissions
val GIVE_OTHERS_PERMISSION = Permission("energeticstorage.give.others", PermissionDefault.OP)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.liamxsage.energeticstorage.commands

import com.liamxsage.energeticstorage.GIVE_OTHERS_PERMISSION
import com.liamxsage.energeticstorage.annotations.RegisterCommand
import com.liamxsage.energeticstorage.extensions.sendMessagePrefixed
import com.liamxsage.energeticstorage.extensions.sendSuccessSound
Expand Down Expand Up @@ -29,7 +30,7 @@ class ESGiveCommand : CommandExecutor, TabExecutor {
}

val item = args[0].lowercase(Locale.getDefault())
val player = if (args.size > 1) Bukkit.getPlayer(args[1]) else sender
val player = if (args.size > 1 && sender.hasPermission(GIVE_OTHERS_PERMISSION)) Bukkit.getPlayer(args[1]) else sender

if (player !is Player) {
sender.sendMessagePrefixed("<red>Only players can receive items")
Expand Down

0 comments on commit 6b5d559

Please sign in to comment.