mirror of
https://e.coding.net/circlecloud/Residence.git
synced 2025-11-24 21:46:16 +00:00
@@ -237,16 +237,14 @@ public class ClaimedResidence {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean addSubzone(Player player, Location loc1, Location loc2, String name,
|
||||
boolean resadmin) {
|
||||
public boolean addSubzone(Player player, Location loc1, Location loc2, String name, boolean resadmin) {
|
||||
if (player == null)
|
||||
return this.addSubzone(null, "Server Land", loc1, loc2, name, resadmin);
|
||||
else
|
||||
return this.addSubzone(player, player.getName(), loc1, loc2, name, resadmin);
|
||||
}
|
||||
|
||||
public boolean addSubzone(Player player, String owner, Location loc1, Location loc2,
|
||||
String name, boolean resadmin) {
|
||||
public boolean addSubzone(Player player, String owner, Location loc1, Location loc2, String name, boolean resadmin) {
|
||||
if (!Residence.validName(name)) {
|
||||
if (player != null) {
|
||||
player.sendMessage(ChatColor.RED
|
||||
@@ -375,7 +373,7 @@ public class ClaimedResidence {
|
||||
return temp;
|
||||
}
|
||||
|
||||
protected CuboidArea getAreaByLoc(Location loc) {
|
||||
public CuboidArea getAreaByLoc(Location loc) {
|
||||
for (CuboidArea thisarea : areas.values()) {
|
||||
if (thisarea.containsLoc(loc))
|
||||
return thisarea;
|
||||
|
||||
@@ -16,7 +16,6 @@ import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
@@ -29,10 +28,8 @@ import com.bekvon.bukkit.residence.event.ResidenceDeleteEvent;
|
||||
import com.bekvon.bukkit.residence.event.ResidenceDeleteEvent.DeleteCause;
|
||||
import com.bekvon.bukkit.residence.event.ResidenceRenameEvent;
|
||||
import com.bekvon.bukkit.residence.permissions.PermissionGroup;
|
||||
import com.bekvon.bukkit.residence.selection.WECUI;
|
||||
import com.bekvon.bukkit.residence.text.help.InformationPager;
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldedit.bukkit.selections.CuboidSelection;
|
||||
import com.sk89q.worldedit.bukkit.selections.Selection;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -426,7 +423,7 @@ public class ResidenceManager {
|
||||
}
|
||||
if (!res.getPermissions().hasResidencePermission(reqPlayer, true) && !resadmin) {
|
||||
reqPlayer
|
||||
.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("NoPermission"));
|
||||
.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("NoPermission"));
|
||||
return;
|
||||
}
|
||||
Player giveplayer = Residence.getServ().getPlayer(targPlayer);
|
||||
@@ -461,11 +458,11 @@ public class ResidenceManager {
|
||||
+ Residence.getLanguage().getPhrase(
|
||||
"ResidenceGive",
|
||||
ChatColor.YELLOW + residence + ChatColor.GREEN + "." + ChatColor.YELLOW
|
||||
+ giveplayer.getName() + ChatColor.GREEN));
|
||||
+ giveplayer.getName() + ChatColor.GREEN));
|
||||
giveplayer.sendMessage(Residence.getLanguage().getPhrase(
|
||||
"ResidenceRecieve",
|
||||
ChatColor.GREEN + residence + ChatColor.YELLOW + "." + ChatColor.GREEN
|
||||
+ reqPlayer.getName() + ChatColor.YELLOW));
|
||||
+ reqPlayer.getName() + ChatColor.YELLOW));
|
||||
}
|
||||
|
||||
public void listAllResidences(Player player, int page) {
|
||||
@@ -586,12 +583,12 @@ public class ResidenceManager {
|
||||
+ Residence.getLanguage().getPhrase(
|
||||
"CoordsTop",
|
||||
res.getAreaByLoc(player.getLocation()).getHighLoc().getBlockX()
|
||||
+ "."
|
||||
+ res.getAreaByLoc(player.getLocation()).getHighLoc()
|
||||
.getBlockY()
|
||||
+ "."
|
||||
+ res.getAreaByLoc(player.getLocation()).getHighLoc()
|
||||
.getBlockZ()));
|
||||
+ "."
|
||||
+ res.getAreaByLoc(player.getLocation()).getHighLoc()
|
||||
.getBlockY()
|
||||
+ "."
|
||||
+ res.getAreaByLoc(player.getLocation()).getHighLoc()
|
||||
.getBlockZ()));
|
||||
player.sendMessage(ChatColor.YELLOW
|
||||
+ Residence.getLanguage().getPhrase("CoordsB")
|
||||
+ ": "
|
||||
@@ -599,19 +596,14 @@ public class ResidenceManager {
|
||||
+ Residence.getLanguage().getPhrase(
|
||||
"CoordsBottom",
|
||||
res.getAreaByLoc(player.getLocation()).getLowLoc().getBlockX()
|
||||
+ "."
|
||||
+ res.getAreaByLoc(player.getLocation()).getLowLoc()
|
||||
.getBlockY()
|
||||
+ "."
|
||||
+ res.getAreaByLoc(player.getLocation()).getLowLoc()
|
||||
.getBlockZ()));
|
||||
+ "."
|
||||
+ res.getAreaByLoc(player.getLocation()).getLowLoc()
|
||||
.getBlockY()
|
||||
+ "."
|
||||
+ res.getAreaByLoc(player.getLocation()).getLowLoc()
|
||||
.getBlockZ()));
|
||||
if (Residence.isUseWorldEdit()) {
|
||||
WorldEditPlugin wep = (WorldEditPlugin) Residence.getServ().getPluginManager()
|
||||
.getPlugin("WorldEdit");
|
||||
Selection selection = new CuboidSelection(Bukkit.getWorld(res.getWorld()), res
|
||||
.getAreaByLoc(player.getLocation()).getLowLoc(), res.getAreaByLoc(
|
||||
player.getLocation()).getHighLoc());
|
||||
wep.setSelection(player, selection);
|
||||
WECUI.UPDATESELECT(res, player);
|
||||
}
|
||||
}
|
||||
if (Residence.getConfigManager().useLeases()
|
||||
|
||||
28
src/com/bekvon/bukkit/residence/selection/WECUI.java
Normal file
28
src/com/bekvon/bukkit/residence/selection/WECUI.java
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.bekvon.bukkit.residence.selection;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.bekvon.bukkit.residence.Residence;
|
||||
import com.bekvon.bukkit.residence.protection.ClaimedResidence;
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldedit.bukkit.selections.CuboidSelection;
|
||||
import com.sk89q.worldedit.bukkit.selections.Selection;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
public class WECUI {
|
||||
public static void UPDATESELECT(ClaimedResidence res, Player player) {
|
||||
WorldEditPlugin wep = (WorldEditPlugin) Residence.getServ().getPluginManager()
|
||||
.getPlugin("WorldEdit");
|
||||
Selection selection = new CuboidSelection(Bukkit.getWorld(res.getWorld()), res
|
||||
.getAreaByLoc(player.getLocation()).getLowLoc(), res.getAreaByLoc(
|
||||
player.getLocation()).getHighLoc());
|
||||
wep.setSelection(player, selection);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
name: Residence
|
||||
main: com.bekvon.bukkit.residence.ResidenceCommandListener
|
||||
version: 2.7.0.4
|
||||
version: 2.7.0.5
|
||||
website: http://ci.citycraft.cn:8800/jenkins/job/Residence-Fix/
|
||||
description: Cuboid Residence Plugin
|
||||
authors: [bekvon,nate302,t00thpick1,喵♂呜]
|
||||
|
||||
Reference in New Issue
Block a user