Rycochet

GroupAPI.java

Nov 11th, 2011
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.32 KB | None | 0 0
  1. /*
  2.  * This file is part of mmoMinecraft (https://github.com/mmoMinecraftDev).
  3.  *
  4.  * mmoMinecraft is free software: you can redistribute it and/or modify
  5.  * it under the terms of the GNU General Public License as published by
  6.  * the Free Software Foundation, either version 3 of the License, or
  7.  * (at your option) any later version.
  8.  *
  9.  * This program is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  * GNU General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU General Public License
  15.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  16.  */
  17. package mmo.Core.GroupAPI;
  18.  
  19. import java.util.List;
  20. import org.bukkit.entity.Player;
  21.  
  22. public interface Group {
  23.  
  24.     // Finding groups
  25.  
  26.     public Group findGroup(String id);
  27.  
  28.     public Group getParent();
  29.  
  30.     public boolean isParent(Group group);
  31.  
  32.     public List<Group> getChildren();
  33.  
  34.     public boolean isChild(Group group);
  35.  
  36.     public List<Group> require();
  37.  
  38.     public List<Group> exclude();
  39.  
  40.     // Finding groups from players
  41.  
  42.     public List<Group> find(Player player);
  43.  
  44.     public List<Group> find(Player player, Group parent);
  45.  
  46.     public List<Group> find(Player player, Group parent, int depth);
  47.  
  48.     public boolean isMember(Player player);
  49.  
  50.     public boolean isOwnMember(Player player);
  51.  
  52.     // Adjust membership
  53.  
  54.     public boolean canInvite(Player from, Player to);
  55.  
  56.     public boolean invite(Player from, Player to);
  57.  
  58.     public boolean accept(Player player);
  59.  
  60.     public boolean canJoin(Player player);
  61.  
  62.     public boolean join(Player player);
  63.  
  64.     public boolean canLeave(Player player);
  65.  
  66.     public boolean leave(Player player);
  67.  
  68.     public boolean canKick(Player from, Player to);
  69.  
  70.     public boolean kick(Player from, Player to);
  71.  
  72.     // Adjust current members
  73.  
  74.     public boolean canPromote(Player from, Player to);
  75.  
  76.     public boolean promote(Player from, Player to);
  77.  
  78.     public boolean canDemote(Player from, Player to);
  79.  
  80.     public boolean demote(Player from, Player to);
  81.  
  82.     // Basic info about the group
  83.  
  84.     public String getId();
  85.  
  86.     public String getName();
  87.  
  88.     public List<String> getMembers();
  89.  
  90.     public String getCategory();
  91.  
  92.     // Metadata
  93.  
  94.     // Copy setXyz methods from mmoPlugin - same as old Configuration
  95. }
Advertisement
Add Comment
Please, Sign In to add comment