Code Monkey home page Code Monkey logo

projectessentials / projectessentials-permissions Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 10.0 7.37 MB

⚖ API for controlling the activities of the player on the server and client. You can limit some commands to the player, his activities in the world and more.

License: MIT License

Groovy 4.08% Kotlin 95.92%
forge-permissions minecraft-mod minecraft-forge-mod minecraft-api minecraft-forge-api forge-api minecraftforge minecraft forge-mod essentialsx

projectessentials-permissions's Introduction

MIT License GitHub Release Donate Discord Chat

What is it

Not mandatory dependency for Project Essentials mods and other mods uses permission checking. API for controlling the activities of the player on the server and client. You can limit some commands to the player, his activities in the world and more.

Explore

Credits

Inspired by: PermissionsEx

projectessentials-permissions's People

Contributors

abhiroopwastaken avatar aircoookie avatar bixelpitch avatar drigio avatar huangyz0918 avatar kuronoseihai avatar luckymurari avatar mairwunnx avatar remikeophila avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

projectessentials-permissions's Issues

Just change base project package to normal package name.

Need change project package to normal name.

Current package name: com.mairwunnx.projectessentialspermissions
Needed package name: com.mairwunnx.projectessentials.permissions

Rename ONLY WITH REFACTORING FUNCTION IN IntellijIDEA!!!

No more. This is a very simple task, but I'm too lazy to do this, so if you want to make your first PR or maybe not the first, then try :)

[need good english] improve spelling readme.md and in-using.md file.

Need to improve the spelling of the text in the documentation files (readme.md and documentation/in-using.md)

I speak technical English, not native, so I make many semantic errors in the text. I will be grateful if you improve my documentation text, I am sure there are problem areas.

If you have any problems - talk with me, I will let you know what I meant. Also, if you want, you can write to me why your option is correct, I will be glad.

Permission groups inheritance permissions.

Permission groups inheritance permissions implementation.

Need to implement groups permissions inheritance from child groups.

In configuration need to create property in each group inherit with string type.

Inheritance means that a group that inherits the rights of a subsidiary group will have its rights in addition to those of the subsidiary groups.

Implement permissions for block break and block place events.

Need to implement permissions for block break, block place.

I think it very simple for implementation.
If player don't have permissions then we must send message to player "don't have ...".

Permissions:

  • common permission: native.event.modifyworld
  • permission for block place: native.event.block.place
  • permission for block break: native.event.block.break

Being OP should bypass all permissions.

Title says it, very annoying to have to work with console and nodes since there isn't even a clear representation of all nodes and what their names are. Plus being added to the "owner" group does absolutely nothing and doesn't even work when being added to it.

Need to write project version changelog into file `changelog.md`

I'm so lazy for it task, because, i create it issue for newbies on github or not newbies :)

You need just create changelog.md file and make it beautiful, changes you can take in file update.json

In json object with name 1.14.4 stores all versions and changes as string, just you need to rewrite all changes for each version to a changelog.md file. And do not forget. Make it beautiful :)

Good luck! 🎉🥰

Crash on World Creation

Describe the bug

  • When you attempt to create a world, the game crashes

This is with PE:Core, PE:Backup, PE:Chat, and PE:Perms

Steps to reproduce the behavior

    1. Create world
    1. Allow to generate
  • Crashes

Expected behavior

  • Normally the world should work properly

Screenshots

  • N/A

Environment information

  • Project Essentials Permissions version: [e.g. v1.0.1]
  • Project Essentials Core version: [e.g. v1.1.0]
  • Project Essentials Modules version: [Backup - v1.0.1; Perms - v1.0.1]
  • Minecraft / Forge version: [e.g. 1.15.2 / 31.1.25]

Additional context

  • N/A

Log files. (latest.log and debug.log file in attachment)

crash-2020-03-21_04.46.07-server.txt

Update some dependencies (e.g `kotlinx.serialization`) and gradle wrapper.

Just needed update dependencies in gradle.properties file.

I think already exist new version of kotlinx.serialization, dokka plugin, gradle wrapper.

Just replace version numbers in gradle.properties file.
Gradle wrapper version can be changed in gradle/wrapper/gradle-wrapper.properties.

New version you can find in https://github.com/search, just type repository name in search bar, and see releases / docs of installation.

Could you support Worldedit Mod?

Hello, the mod is great. But I find it only support vanilla commands. For EssentialsX plugin, it can control the permission in Worldeidt plugin. In 1.14.4 or 1.15.2 forge, the Worldedit mod can't set permissions by our Project Essentials Permissions. Hope you can add the support for it, thanks a lot.
Sorry for my bad English.

Permissions listings in-game

Currently there does not appear to be any way to see a list of permissions groups, the list of nodes within the groups, or the members of a group, etc. without reading the permissions file on the server. Commands for listing existing permissions in-game would be very useful.

Permission extensions \ auto completion via `*` literal.

Permission extensions with * literal implementation.

In configuration need to create property in each group inherit with string type.

In short, the literal * allows you to continue the right without the exact name of the sub-right.

Usage example: ess.perm.user \ ess.perm.group can be replaced on ess.perm.* permission.

Need to create pull request template file for repository.

Need to create pull request template file.

I think it is not difficult for a beginner or not a beginner. I am too lazy to do this, so I hope someone takes this not a difficult task.

You can see the pull request template in other repositories (it is not in all repositories), or if you know how it should look, then go for it!

If there are questions related to this which I do not know, ask them here and we will discuss this.

Info about creation pull request file https://help.github.com/en/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository

Not possible to use wildcards in permissions nodes

Currently it is impossible to assign permissions nodes containing wildcards using in-game commands.

Example: /permission group worldedit set worldedit.* gives Expected whitespace to end one argument, but found trailing data.

Add permission controlling for vanilla commands.

Permission controlling for vanilla commands implementation.

This is a very difficult task, or rather only a part of it.

Need to do something similar to the HashMap with String and String data types, as the key the name of the command will be used, as the value will be used by permission node.

Permissions node example for any command:

    command - /gamemode creative
    permission - ess.gamemode.creative
    command - /time query ticks
    permission - ess.time.query.ticks

Do not worry about such large names of permissions, they can all be reduced due to changes in version 1.0.0.0. (i.e ess.time.query.ticks -> ess.time.query.* or ess.time.*)

The simplest thing is to prohibit the use of the command, but how to allow it? Especially if you do not have operator rights.

Imagine that you do not have operator rights, but you have essentials permissions, the verification for the right will succeed, but further verification of the team may fail and with the message that you do not have the rights. This is one of the problems that I will solve after version 1.0.0.0. If you have ideas for implementing this feature, please write here about it.

Megathread for localization contributors.

Just localization contributors megathread 🌍

👋 We welcome new contributors to the organization or repository! Localization is very important to us, it expands our reach for Project Essentials modifications.

All localization file storing in src/main/resources/assets/projectessentialspermissions/lang path with json format, and have naming style en_us and ru_ru for example.

Important note 1: §c and other §<some symbol> it color codes for minecraft.
Important note 2: %s it string argument what will be putted in line.
Important note 3: string in <> and in [] not needed in translate.

e.g: §6Permission §7%s §6removed from user §7%s§6. string is Permission %s removed from user %s. when first %s it permission name, second %s it user name.

e.g:

§6Usage example: §7/ess permissions user §8<nickname> §7set group §8<group name>
        ↓
§6Пример использования: §7/ess permissions user §8<nickname> §7set group §8<group name>

For questions write here. Good luck, happy localizing! 🌍

Code and dependency cleanup for `build.gradle` and `gradle.properties` files.

Need to cleanup dependencies and code in file build.gradle, and basically name refactoring in gradle.properties file.

  • naming refactoring: all variable names change case from CamelCase to snake_case.
  • dependency refactoring: just remove unused dependencies and cleanup repositories list.
  • remove unused scripts for ktlint extensions and other.

Groups not setting on perm user commadn

Describe the bug

  • When using perm user [Username] set [Group name] a permission node with whatever string populates into the users Permissions section rather than changing their group

Steps to reproduce the behavior

Run perm user [Username] set [Already defined group name]

Expected behavior

A user to have their group changed

Screenshots

Not a screenshot but here's my Permissions.json. The exact command I'm running is perm user Norava set Eldritch
`{
"groups": [
{
"name": "Anomaly",
"isDefault": true,
"permissions": [
"native.help",
"native.list",
"native.me",
"native.message",
"native.teammsg",
"native.tell",
"native.trigger",
"native.w",
"native.event.modifyworld",
"ess.warp",
"ess.warp.set",
"ess.warp.remove",
"ess.chat",
"ess.chat.mention.all",
"ess.home",
"ess.home.set",
"ess.home.remove",
"ess.spawn",
"ess.afk",
"ess.sendpos",
"ess.tpaccept",
"ess.tpdeny",
"ess.tptoggle",
"ess.tpaall",
"ess.tpacancel",
"ess.tpa",
"ess.tpahere"
],
"inheritFrom": [
]
},
{
"name": "Star",
"isDefault": false,
"permissions": [
"native.tp",
"ess.suicide"
],
"inheritFrom": [
"Anomaly"
]
},
{
"name": "Voidling",
"isDefault": false,
"permissions": [
"ess.top"
],
"inheritFrom": [
"Star"
]
},
{
"name": "Eldritch",
"isDefault": false,
"permissions": [
""
],
"inheritFrom": [
"Voidling"
]
}
],
"users": [
{
"nickname": "
",
"group": "default",
"permissions": [
]
},
{
"nickname": "#server",
"group": "owner",
"permissions": [
]
},
{
"nickname": "OniNikku",
"group": "Eldritch",
"permissions": [
""
]
},
{
"nickname": "007Deer",
"group": "Voidling",
"permissions": [
""
]
},
{
"nickname": "Norava",
"group": "Eldritch",
"permissions": [
""

        ]
    }
]

}`

Environment information

  • Project Essentials Permissions version:1.15.2-1.0.2
  • Project Essentials Core version: 1.15.2-1.1.0
  • Project Essentials Cooldown version: 1.15.2-1.0.2
  • Project Essentials Modules version: 1.15.2-1.1.0
  • Minecraft / Forge version: 1.15.2-31.2.20

Additional context

  • Add any other context about the problem here.

Log files. (latest.log and debug.log file in attachment)

Permission problem after playername-change

Describe the bug

I changed my ingame player name in minecraft.net lately and since then i can´t use any commands like /time set day oder /gamemode. I am pretty shure this was the beginning of the problem because it happened right after this. (all other OP´s can use their commands like always)
We play on a 1.15.2 Server with forge 31.1.0 and different mods.
Also with project core, permission, home and cooldown.

I tested it in singleplayer and multiplayer and i had the same problem, just the error messages are different on the screen.
We open Minecraft with twitch, so i tested: deleting all project mods and also the folder of it - and my commands worked again! (singleplayer)
I reinstalled the project mods and the error was again! (Singleplayer)

So it seems it has nothing to do with our server because the problem occurs in singleplayer too, but only with the project mods i mentioned.
Cheats are ON, and withouth the project mods everything is working fine.
I deinstalled them and installed them new, but the issue stays the same.

So I need your help please, I am pretty sure it has something to do with my ingame name change because it happens since then. I am op on server and singleplayer, cheats are on, my op level is 4, so everything should work fine like before - i haven´t changed anything, also not at the project essentials mods or configuration/permissions.
My new ingame name and my uuid are correctly in the files.

Screenshots

Error on the Server:
Screen Shot 04-07-20 at 03 22 PM 002

Error in Singleplayer:
Screen Shot 04-07-20 at 03 22 PM 001

Environment information

  • Project Essentials Permissions version: [Project Essentials Permissions-1.15.2-1.0.2.jar]
  • Project Essentials Core version: [Project Essentials Core-MOD-1.15.2-1.1.0.jar]
  • Project Essentials Modules version: [Project Essentials Home-1.15.2-1.1.0.jar AND Project Essentials Cooldown-1.15.2-1.0.2.jar]
  • Minecraft / Forge version: [1.15.2 / 31.1.0]

Additional context

  • As I already mentioned - all the server and singleplayer settings are like before when everything worked fine for me - all other op´s can use their commands like always. The problem occurs only by me (I changed my ingame name lately) and accours only with the project essential mods. If i delete them it is working again.
    Maybe there is a project file anywhere which doesn´t get deleted when i deinstall it. Because i tried deinstalling and also deleting the folder in Minecraft i found after it, deinstalled is working, but if i reinstall it again the error occurs again.
    I tested different commands like /time, /gamemode, /tp, and so on....

Log files.

Only message in log file with the error:

SINGLEPLAYER:
[15:22:00] [Server thread/INFO]: Player (Das_Fantatier) failed to executing "/time" command
- Reason: permission level executing command more than player permission level.
[15:22:00] [Render thread/INFO]: [CHAT] §cYou §7don't have permission §cto execute this command.

SERVER:
[07Apr2020 15:22:27.980] [Server thread/INFO] [com.mairwunnx.projectessentials.core.vanilla.commands.TimeCommand/]: Player (Das_Fantatier) failed to executing "/time" command
- Reason: permission level executing command more than player permission level.

Thank you in advice and sorry for this long text, I just wanted to be sure to mention everything necessary!

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.