C# Class TShockAPI.DB.Region

显示文件 Open project: NyxStudios/TShock Class Usage Examples

Public Methods

Method Description
HasPermissionToBuildInRegion ( TSPlayer ply ) : bool

Checks if a given player has permission to build in the region

InArea ( Rectangle point ) : bool

Checks if a given point is in the region's area

InArea ( int x, int y ) : bool

Checks if a given (x, y) coordinate is in the region's area

Region ( ) : System
Region ( int id, Rectangle region, string name, string owner, bool disablebuild, string RegionWorldIDz, int z ) : System
RemoveGroup ( string groupName ) : bool

Removes a group's access to the region

RemoveID ( int id ) : bool

Removes a user's access to the region

SetAllowedGroups ( String groups ) : void

Sets the group names which are allowed to use the region

SetAllowedIDs ( String ids ) : void

Sets the user IDs which are allowed to use the region

Method Details

HasPermissionToBuildInRegion() public method

Checks if a given player has permission to build in the region
public HasPermissionToBuildInRegion ( TSPlayer ply ) : bool
ply TSPlayer Player to check permissions with
return bool

InArea() public method

Checks if a given point is in the region's area
public InArea ( Rectangle point ) : bool
point Rectangle Point to check
return bool

InArea() public method

Checks if a given (x, y) coordinate is in the region's area
public InArea ( int x, int y ) : bool
x int X coordinate to check
y int Y coordinate to check
return bool

Region() public method

public Region ( ) : System
return System

Region() public method

public Region ( int id, Rectangle region, string name, string owner, bool disablebuild, string RegionWorldIDz, int z ) : System
id int
region Rectangle
name string
owner string
disablebuild bool
RegionWorldIDz string
z int
return System

RemoveGroup() public method

Removes a group's access to the region
public RemoveGroup ( string groupName ) : bool
groupName string Group name to remove
return bool

RemoveID() public method

Removes a user's access to the region
public RemoveID ( int id ) : bool
id int User ID to remove
return bool

SetAllowedGroups() public method

Sets the group names which are allowed to use the region
public SetAllowedGroups ( String groups ) : void
groups String String of group names to set
return void

SetAllowedIDs() public method

Sets the user IDs which are allowed to use the region
public SetAllowedIDs ( String ids ) : void
ids String String of IDs to set
return void