mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Grant plots to the correct player
This commit is contained in:
parent
05ce67fbfe
commit
ad40ab7e1e
@ -83,7 +83,7 @@ public class Grant extends Command {
|
|||||||
final UUID uuid = uuids.toArray(new UUID[0])[0];
|
final UUID uuid = uuids.toArray(new UUID[0])[0];
|
||||||
PlotPlayer<?> pp = PlotSquared.platform().getPlayerManager().getPlayerIfExists(uuid);
|
PlotPlayer<?> pp = PlotSquared.platform().getPlayerManager().getPlayerIfExists(uuid);
|
||||||
if (pp != null) {
|
if (pp != null) {
|
||||||
try (final MetaDataAccess<Integer> access = player.accessPersistentMetaData(
|
try (final MetaDataAccess<Integer> access = pp.accessPersistentMetaData(
|
||||||
PlayerMetaDataKeys.GRANTED_PLOTS)) {
|
PlayerMetaDataKeys.GRANTED_PLOTS)) {
|
||||||
if (args[0].equalsIgnoreCase("check")) {
|
if (args[0].equalsIgnoreCase("check")) {
|
||||||
Captions.GRANTED_PLOTS.send(player, access.get().orElse(0));
|
Captions.GRANTED_PLOTS.send(player, access.get().orElse(0));
|
||||||
|
Loading…
Reference in New Issue
Block a user