mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-10-02 06:44:39 +00:00
Corrected permission testing a bit
This commit is contained in:
parent
a109134b92
commit
b07ba21659
|
@ -37,16 +37,15 @@ public class Commandptime extends EssentialsCommand
|
|||
// If no arguments we are reading the time
|
||||
if (args.length == 0)
|
||||
{
|
||||
// TODO do we need to check for the essentials.time permission? Or is that tested for us already.
|
||||
getUsersTime(sender, users);
|
||||
return;
|
||||
}
|
||||
|
||||
User user = ess.getUser(sender);
|
||||
if ( user != null && ! user.isAuthorized("essentials.time.player"))
|
||||
if ( user != null && ! user.isAuthorized("essentials.ptime.others"))
|
||||
{
|
||||
// TODO should not be hardcoded !!
|
||||
sender.sendMessage(colorBad + "You are no authorized to set PlayerTime");
|
||||
sender.sendMessage(colorBad + "You are not authorized to set others PlayerTime");
|
||||
return; // TODO: How to not just die silently? in a good way??
|
||||
}
|
||||
|
||||
|
|
|
@ -37,16 +37,15 @@ public class Commandtime extends EssentialsCommand
|
|||
// If no arguments we are reading the time
|
||||
if (args.length == 0)
|
||||
{
|
||||
// TODO do we need to check for the essentials.time permission? Or is that tested for us already.
|
||||
getWorldsTime(sender, worlds);
|
||||
return;
|
||||
}
|
||||
|
||||
User user = ess.getUser(sender);
|
||||
if ( user != null && ! user.isAuthorized("essentials.time.world"))
|
||||
if ( user != null && ! user.isAuthorized("essentials.time.set"))
|
||||
{
|
||||
// TODO should not be hardcoded !!
|
||||
sender.sendMessage(colorBad + "You are no authorized to set the time");
|
||||
sender.sendMessage(colorBad + "You are not authorized to set the time");
|
||||
return; // TODO: How to not just die silently? in a good way??
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue