mirror of
https://e.coding.net/circlecloud/ProtectItem.git
synced 2024-12-27 20:48:51 +00:00
添加构建版本号 修复一个逻辑错误...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
b871b570c0
commit
aec031f916
10
pom.xml
10
pom.xml
@ -52,6 +52,11 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<jenkins.url>http://ci.citycraft.cn:8080</jenkins.url>
|
||||
<update.description>完善命令...</update.description>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
@ -76,9 +81,4 @@
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<jenkins.url>http://ci.citycraft.cn:8080</jenkins.url>
|
||||
<update.description>完善命令...</update.description>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
</project>
|
@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import cn.citycraft.ProtectItem.ProtectItem;
|
||||
@ -20,12 +21,13 @@ public class ClickItemListen implements Listener {
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onClickItem(final InventoryClickEvent e) {
|
||||
final Player p = (Player) e.getWhoClicked();
|
||||
final ItemStack i = e.getCurrentItem();
|
||||
final Inventory inv = e.getInventory();
|
||||
final int solt = e.getSlot();
|
||||
final ItemStack i = inv.getItem(solt);
|
||||
if (i != null && i.getType() != Material.AIR) {
|
||||
if (plugin.isCantAction(p, i, ActionType.Click)) {
|
||||
try {
|
||||
e.getInventory().setItem(solt, new ItemStack(Material.AIR));
|
||||
inv.setItem(solt, new ItemStack(Material.AIR));
|
||||
} catch (final Exception e2) {
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: ${project.artifactId}
|
||||
description: ${project.description}
|
||||
main: ${project.groupId}.${project.artifactId}.${project.artifactId}
|
||||
version: ${project.version}
|
||||
version: ${project.version}-Build#${env.BUILD_NUMBER}
|
||||
author: 喵♂呜
|
||||
website: ${jenkins.url}/job/${project.artifactId}/
|
||||
commands:
|
||||
|
Loading…
Reference in New Issue
Block a user