Code Monkey home page Code Monkey logo

Comments (10)

MairwunNx avatar MairwunNx commented on July 17, 2024

@seisatsu I completely agree, this is very useful, it will be implemented in the next minor version v1.14.4-1.3.0. Thanks 🥰! What name of command do you expect for a list of rights and what message format do you expect? I will be glad if you describe the task in more detail, this will allow me to complete it in more detail. 😉

from projectessentials-permissions.

seisatsu avatar seisatsu commented on July 17, 2024

There's probably a few ways it could be done. Here's some ideas that work with how the commands are written currently.

/permissions group [name] with no extra arguments lists the group's members and nodes.
/permissions user [name] with no extra arguments lists the user's groups and nodes.
/permissions list lists the groups.

from projectessentials-permissions.

Yoosk avatar Yoosk commented on July 17, 2024

In case of permissions, do we have ability to restrict anyone from using given item?

from projectessentials-permissions.

MairwunNx avatar MairwunNx commented on July 17, 2024

@Yoosk

Yes, you can, if you write your own handler for using items, but if you want built-in processing for using items, I will try to add this only in the next version.

If things are registered in your mod, you can override onUse method or something like that where to check for a certain permission.

It should look something like this (if use kotlin)

override fun OnItemUse(event: ...) {
    // Item use will be canceled if player don't have certain permission.
    event.cancel = !PermissionsAPI.hasPermission(...)
    // Send message "You don't have permissions for use it item ...".
}

If this answer is not enough for you or you want to ask more, create a separate issue, it will be more convenient.

from projectessentials-permissions.

MairwunNx avatar MairwunNx commented on July 17, 2024

Not related to this issue

@Yoosk resolved in 2.0.0-SNAPSHOT.1+MC-1.14.4 and will included in 2.0.0-RC.1+MC-1.14.4 (Release Candidate) for testing this feature.

Usage example will added to documentation before pushing Release Candidate version to project releases. Thanks.

Currently changes in local git and no able for testing.

from projectessentials-permissions.

MairwunNx avatar MairwunNx commented on July 17, 2024

@seisatsu I started work on this, as soon as I have news for you, I will update the labels in this issue.

from projectessentials-permissions.

MairwunNx avatar MairwunNx commented on July 17, 2024

Implemented in 619b728, but this issue will closed when will implemented listing for group too.

from projectessentials-permissions.

MairwunNx avatar MairwunNx commented on July 17, 2024

Implemented in 4af6aee, but this changes need test and code will cleaned in Release.

from projectessentials-permissions.

MairwunNx avatar MairwunNx commented on July 17, 2024

This issue will closed after tests by me or someone other.

from projectessentials-permissions.

MairwunNx avatar MairwunNx commented on July 17, 2024

Resolved in 8cf6a50 commit and tested on server and client. Feature included in SNAPSHOT.2.

from projectessentials-permissions.

Related Issues (19)

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.