mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Adding new permission for the /mmoupdate command.
This commit is contained in:
		@@ -15,7 +15,10 @@ import com.gmail.nossr50.util.Users;
 | 
				
			|||||||
public class MmoupdateCommand implements CommandExecutor {
 | 
					public class MmoupdateCommand implements CommandExecutor {
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
 | 
					    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
 | 
				
			||||||
        if (CommandHelper.noCommandPermissions(sender, "mcmmo.admin")) {
 | 
					        // DEPRECATED PERMISSION
 | 
				
			||||||
 | 
					        boolean oldPermission = !CommandHelper.noCommandPermissions(sender, "mcmmo.admin");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (!oldPermission && CommandHelper.noCommandPermissions(sender, "mcmmo.commands.mmoupdate")) {
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -137,10 +137,11 @@ permissions:
 | 
				
			|||||||
        default: false
 | 
					        default: false
 | 
				
			||||||
        description: Implies all mcmmo permissions.
 | 
					        description: Implies all mcmmo permissions.
 | 
				
			||||||
        children:
 | 
					        children:
 | 
				
			||||||
 | 
					            mcmmo.bypass.all: true
 | 
				
			||||||
 | 
					            mcmmo.commands.all: true
 | 
				
			||||||
            mcmmo.defaults: true
 | 
					            mcmmo.defaults: true
 | 
				
			||||||
            mcmmo.defaultsop: true
 | 
					            mcmmo.defaultsop: true
 | 
				
			||||||
            mcmmo.perks.all: true
 | 
					            mcmmo.perks.all: true
 | 
				
			||||||
            mcmmo.bypass.all: true
 | 
					 | 
				
			||||||
    mcmmo.defaults:
 | 
					    mcmmo.defaults:
 | 
				
			||||||
        default: true
 | 
					        default: true
 | 
				
			||||||
        description: mcmmo permisions that default to true
 | 
					        description: mcmmo permisions that default to true
 | 
				
			||||||
@@ -159,7 +160,10 @@ permissions:
 | 
				
			|||||||
            mcmmo.admin: true
 | 
					            mcmmo.admin: true
 | 
				
			||||||
            mcmmo.tools.all: true
 | 
					            mcmmo.tools.all: true
 | 
				
			||||||
    mcmmo.admin:
 | 
					    mcmmo.admin:
 | 
				
			||||||
        description: Allows access to mmoupdate and other sensitive commands
 | 
					        default: false
 | 
				
			||||||
 | 
					        description: Implies access to everything in mcMMO
 | 
				
			||||||
 | 
					        children:
 | 
				
			||||||
 | 
					            mcmmo.all: true
 | 
				
			||||||
    mcmmo.perks.*:
 | 
					    mcmmo.perks.*:
 | 
				
			||||||
        default: false
 | 
					        default: false
 | 
				
			||||||
        description: implies access to all mcmmo perks
 | 
					        description: implies access to all mcmmo perks
 | 
				
			||||||
@@ -706,6 +710,7 @@ permissions:
 | 
				
			|||||||
            mcmmo.commands.inspect.offline: true
 | 
					            mcmmo.commands.inspect.offline: true
 | 
				
			||||||
            mcmmo.commands.mmoedit: true
 | 
					            mcmmo.commands.mmoedit: true
 | 
				
			||||||
            mcmmo.commands.mmoedit.others: true
 | 
					            mcmmo.commands.mmoedit.others: true
 | 
				
			||||||
 | 
					            mcmmo.commands.mmoupdate: true
 | 
				
			||||||
    mcmmo.commands.defaults:
 | 
					    mcmmo.commands.defaults:
 | 
				
			||||||
        description: Implies all default mcmmo.commands permissions.
 | 
					        description: Implies all default mcmmo.commands permissions.
 | 
				
			||||||
        children:
 | 
					        children:
 | 
				
			||||||
@@ -721,9 +726,9 @@ permissions:
 | 
				
			|||||||
    mcmmo.commands.addlevels.others:
 | 
					    mcmmo.commands.addlevels.others:
 | 
				
			||||||
        description: Allows access to the addlevels command for other players
 | 
					        description: Allows access to the addlevels command for other players
 | 
				
			||||||
    mcmmo.commands.addxp:
 | 
					    mcmmo.commands.addxp:
 | 
				
			||||||
        description: Allows access to the addlevels command
 | 
					        description: Allows access to the addxp command
 | 
				
			||||||
    mcmmo.commands.addxp.others:
 | 
					    mcmmo.commands.addxp.others:
 | 
				
			||||||
        description: Allows access to the addlevels command for other players
 | 
					        description: Allows access to the addxp command for other players
 | 
				
			||||||
    mcmmo.commands.inspect.*:
 | 
					    mcmmo.commands.inspect.*:
 | 
				
			||||||
        description: Implies access to all mcmmo.commands.inspect permissions
 | 
					        description: Implies access to all mcmmo.commands.inspect permissions
 | 
				
			||||||
        children:
 | 
					        children:
 | 
				
			||||||
@@ -741,9 +746,11 @@ permissions:
 | 
				
			|||||||
    mcmmo.commands.inspect.offline:
 | 
					    mcmmo.commands.inspect.offline:
 | 
				
			||||||
        description: Allows access to the inspect command for offline players
 | 
					        description: Allows access to the inspect command for offline players
 | 
				
			||||||
    mcmmo.commands.mmoedit:
 | 
					    mcmmo.commands.mmoedit:
 | 
				
			||||||
        description: Allows access to the addlevels command
 | 
					        description: Allows access to the mmoedit command
 | 
				
			||||||
    mcmmo.commands.mmoedit.others:
 | 
					    mcmmo.commands.mmoedit.others:
 | 
				
			||||||
        description: Allows access to the addlevels command for other players
 | 
					        description: Allows access to the mmoedit command for other players
 | 
				
			||||||
 | 
					    mcmmo.commands.mmoupdate:
 | 
				
			||||||
 | 
					        description: Allows access to the mmoupdate command
 | 
				
			||||||
    mcmmo.commands.party.*:
 | 
					    mcmmo.commands.party.*:
 | 
				
			||||||
        description: Implies access to all mcmmo.commands.party permissions.
 | 
					        description: Implies access to all mcmmo.commands.party permissions.
 | 
				
			||||||
        children:
 | 
					        children:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user