1
0
mirror of https://e.coding.net/circlecloud/ProtectItem.git synced 2026-05-02 01:48:50 +00:00

更新项目数据

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092
2015-04-28 15:44:46 +08:00
parent 2264925f6a
commit d0f3d53f7f
8 changed files with 70 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
package com.github.j502647092.BanDropDirt;
package cn.CityCraft.ProtectItem;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@@ -6,10 +6,10 @@ import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import com.github.j502647092.BanDropDirt.listen.BreakBlockListen;
import com.github.j502647092.BanDropDirt.listen.DropItemListen;
import com.github.j502647092.BanDropDirt.listen.PickupItemListen;
import com.github.j502647092.BanDropDirt.listen.PlaceBlockListen;
import cn.CityCraft.ProtectItem.listen.BreakBlockListen;
import cn.CityCraft.ProtectItem.listen.DropItemListen;
import cn.CityCraft.ProtectItem.listen.PickupItemListen;
import cn.CityCraft.ProtectItem.listen.PlaceBlockListen;
public class Main extends JavaPlugin {
public String servername;
@@ -23,14 +23,18 @@ public class Main extends JavaPlugin {
}
public void onEnable() {
Bukkit.getPluginManager()
.registerEvents(new DropItemListen(this), this);
Bukkit.getPluginManager().registerEvents(new PickupItemListen(this),
this);
Bukkit.getPluginManager().registerEvents(new BreakBlockListen(this),
this);
Bukkit.getPluginManager().registerEvents(new PlaceBlockListen(this),
this);
if (getConfig().getBoolean("Protect.Drop", true))
Bukkit.getPluginManager().registerEvents(new DropItemListen(this),
this);
if (getConfig().getBoolean("Protect.Pickup", true))
Bukkit.getPluginManager().registerEvents(
new PickupItemListen(this), this);
if (getConfig().getBoolean("Protect.Break", true))
Bukkit.getPluginManager().registerEvents(
new BreakBlockListen(this), this);
if (getConfig().getBoolean("Protect.Place", true))
Bukkit.getPluginManager().registerEvents(
new PlaceBlockListen(this), this);
getLogger().info("BanDropDirt已加载!");
}

View File

@@ -1,11 +1,11 @@
package com.github.j502647092.BanDropDirt.listen;
package cn.CityCraft.ProtectItem.listen;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import com.github.j502647092.BanDropDirt.Main;
import cn.CityCraft.ProtectItem.Main;
public class BreakBlockListen implements Listener {
Main plugin;

View File

@@ -1,11 +1,11 @@
package com.github.j502647092.BanDropDirt.listen;
package cn.CityCraft.ProtectItem.listen;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerDropItemEvent;
import com.github.j502647092.BanDropDirt.Main;
import cn.CityCraft.ProtectItem.Main;
public class DropItemListen implements Listener {
Main plugin;

View File

@@ -1,11 +1,11 @@
package com.github.j502647092.BanDropDirt.listen;
package cn.CityCraft.ProtectItem.listen;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerPickupItemEvent;
import com.github.j502647092.BanDropDirt.Main;
import cn.CityCraft.ProtectItem.Main;
public class PickupItemListen implements Listener {
Main plugin;

View File

@@ -1,11 +1,11 @@
package com.github.j502647092.BanDropDirt.listen;
package cn.CityCraft.ProtectItem.listen;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
import com.github.j502647092.BanDropDirt.Main;
import cn.CityCraft.ProtectItem.Main;
public class PlaceBlockListen implements Listener {
Main plugin;

View File

@@ -12,6 +12,14 @@ Message:
Pickup: '&c当前世界禁止拾取泥土,拾取的泥土已清空!'
Place: '&c当前世界禁止放置泥土,箱子!'
Break: '&c当前世界禁止破坏泥土,箱子!'
#受到保护的类型
Protect:
Drop: true
Pickup: true
Place: true
Break: true
#受到保护的世界(不区分大小写)
ProtectWorld:
- world