Giter Site home page Giter Site logo

Comments (5)

Sleaker avatar Sleaker commented on August 17, 2024

getPlayerGroups(player) - will return only world-specific groups. you may be thinking of getPlayerGroups(null, player); which should return all groups on the player

from vault.

wiigor avatar wiigor commented on August 17, 2024

There is only 1 world named "world" on the server I tested on. And the player is in it when calling getPlayerGroups(Player player)

These 3 getplayergroup methods exists:

1 public String[] getPlayerGroups(String world, String player);
2 public String[] getPlayerGroups(World world, String player);
3 public String[] getPlayerGroups(Player player);

If i use getPlayerGroups(null, player) I get an ambigious method call error since it can refer to both method 1 and 2.

if i make a World world = null and pass it like this getPlayerGroups(world, "wiigor");
i get

java.lang.NullPointerException
at net.milkbowl.vault.permission.Permission.getPlayerGroups(Permission.java:481)
at me.wiigor.wiipay.WiiPay.handleShowUserGroups(WiiPay.java:70)
at me.wiigor.wiipay.WiiPay.onCommand(WiiPay.java:63)
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)

I only want to imput the name of the player and get the list of groups the player is in.

from vault.

Sleaker avatar Sleaker commented on August 17, 2024

try getPlayerGroup((String) null, playerName) this casts null to a string to prevent the ambiguity issue. you can't pass a null world object, but I can fix the possibility of an NPE on that method to support it.

from vault.

wiigor avatar wiigor commented on August 17, 2024

Thanks when using the method above it works for permissions bukkit. But will it work now for other permission systems?

Is passing null where you can pass a world name string in general the way to select from all words in vault?

from vault.

Sleaker avatar Sleaker commented on August 17, 2024

@wiigor - if the permission plugin supports global groups then it should work like that. I'm fairly certain it does in PEX/P3, but unsure of the other ones as bPerms has been world-only until recently, so it may not handle it properly.

from vault.

Related Issues (20)

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.