1
0
mirror of https://e.coding.net/circlecloud/Residence.git synced 2025-11-24 21:46:16 +00:00

Downgrade to java7...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092
2015-09-26 21:58:00 +08:00
parent 08e3ed84e2
commit 7fb4e37e32
5 changed files with 19 additions and 10 deletions

View File

@@ -11,7 +11,7 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
@@ -21,5 +21,11 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>

View File

@@ -19,8 +19,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version> <version>3.1</version>
<configuration> <configuration>
<source>1.8</source> <source>1.7</source>
<target>1.8</target> <target>1.7</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>

View File

@@ -408,7 +408,6 @@ public class Residence extends JavaPlugin {
} }
economy = null; economy = null;
if (this.getConfig().getBoolean("Global.EnableEconomy", false)) { if (this.getConfig().getBoolean("Global.EnableEconomy", false)) {
this.getLogger().info("启用经济系统...");
if (gmanager.getPermissionsPlugin() instanceof ResidenceVaultAdapter) { if (gmanager.getPermissionsPlugin() instanceof ResidenceVaultAdapter) {
final ResidenceVaultAdapter vault = (ResidenceVaultAdapter) gmanager.getPermissionsPlugin(); final ResidenceVaultAdapter vault = (ResidenceVaultAdapter) gmanager.getPermissionsPlugin();
if (vault.economyOK()) { if (vault.economyOK()) {
@@ -423,7 +422,7 @@ public class Residence extends JavaPlugin {
this.loadEssentialsEconomy(); this.loadEssentialsEconomy();
} }
if (economy == null) { if (economy == null) {
this.getLogger().warning("未找到经济系统..."); this.getLogger().warning("经济系统已启用,但是未找到经济插件...");
} }
} }
try { try {
@@ -457,11 +456,10 @@ public class Residence extends JavaPlugin {
if (wep != null) { if (wep != null) {
smanager = new WorldEditSelectionManager(this); smanager = new WorldEditSelectionManager(this);
useWorldEdit = true; useWorldEdit = true;
this.getLogger().info("发现 WorldEdit"); this.getLogger().info("发现 WorldEdit 已启用相关支持...");
} else { } else {
smanager = new SelectionManager(this); smanager = new SelectionManager(this);
useWorldEdit = false; useWorldEdit = false;
this.getLogger().warning("WorldEdit 未找到!");
} }
blistener = new ResidenceBlockListener(this); blistener = new ResidenceBlockListener(this);
plistener = new ResidencePlayerListener(this); plistener = new ResidencePlayerListener(this);
@@ -473,7 +471,6 @@ public class Residence extends JavaPlugin {
pm.registerEvents(plistener1_8, this); pm.registerEvents(plistener1_8, this);
} }
pm.registerEvents(elistener, this); pm.registerEvents(elistener, this);
firstenable = false; firstenable = false;
} else { } else {
plistener = new ResidencePlayerListener(this); plistener = new ResidencePlayerListener(this);
@@ -482,8 +479,8 @@ public class Residence extends JavaPlugin {
fmanager = new FlagManager(this); fmanager = new FlagManager(this);
fmanager.init(); fmanager.init();
this.getLogger().info("开始加载领地补丁...");
pm.registerEvents(new ResidenceBugFix(this), this); pm.registerEvents(new ResidenceBugFix(this), this);
this.getLogger().info("刷甘蔗漏洞补丁已加载...");
taskmanager.add(this.getServer().getScheduler().runTaskTimer(this, new HealTask(this), 20, 20)); taskmanager.add(this.getServer().getScheduler().runTaskTimer(this, new HealTask(this), 20, 20));

View File

@@ -9,6 +9,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPhysicsEvent; import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;
import com.bekvon.bukkit.residence.Residence; import com.bekvon.bukkit.residence.Residence;
import com.bekvon.bukkit.residence.protection.ClaimedResidence; import com.bekvon.bukkit.residence.protection.ClaimedResidence;
@@ -19,6 +20,8 @@ public class ResidenceBugFix implements Listener {
public ResidenceBugFix(final Residence plugin) { public ResidenceBugFix(final Residence plugin) {
this.plugin = plugin; this.plugin = plugin;
plugin.getLogger().info("防刷甘蔗补丁已加载...");
plugin.getLogger().info("防刷铁轨补丁已加载...");
} }
@EventHandler @EventHandler
@@ -33,6 +36,10 @@ public class ResidenceBugFix implements Listener {
public void onPlace(final PlayerInteractEvent e) { public void onPlace(final PlayerInteractEvent e) {
try { try {
final Player p = e.getPlayer(); final Player p = e.getPlayer();
final ItemStack it = p.getItemInHand();
if (it == null || it.getType() == Material.AIR) {
return;
}
final Block b = e.getClickedBlock(); final Block b = e.getClickedBlock();
final BlockFace bf = e.getBlockFace(); final BlockFace bf = e.getBlockFace();
if (bf == null) { if (bf == null) {

View File

@@ -124,7 +124,6 @@ public class PermissionManager {
plugin.getLogger().info("发现 Vault, 但是 Vault 未找到权限系统..."); plugin.getLogger().info("发现 Vault, 但是 Vault 未找到权限系统...");
} }
} }
plugin.getLogger().warning("权限系统未找到!");
} }
private void readConfig(final FileConfiguration config) { private void readConfig(final FileConfiguration config) {