Comments (5)
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.
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.
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.
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.
@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)
- Update the plugin plz to 1.18.2 HOT 8
- HOST ERROR? HOT 11
- Economy Provider issue HOT 2
- Economy provider issue HOT 1
- Small Feature Request HOT 1
- Permission System Request (CloudNet -> CloudPerms) HOT 2
- Server goes offline every time vault checks for updates HOT 3
- Vault Big Error HOT 6
- Please update to 1.19.x HOT 19
- Please support database to optimize performance HOT 2
- Support Folia HOT 4
- I want to include your plugin on my website HOT 1
- I am not able to increase my balance via /pay command HOT 1
- Please update to 1.20.x HOT 15
- Vault MVC Issue 1.20.x HOT 1
- Plugin already init HOT 3
- Economy got wiped? HOT 6
- Chicken egg now spawning babys HOT 1
- The latest version Vault1.7.3 has issues with papermc1.20.4 HOT 1
- Add support for Folia (Multi-thread Paper Fork)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vault.