mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2024-12-24 21:48:56 +08:00
修复了飞行权限逻辑错误问题、修复了玩家特权更新失效问题
This commit is contained in:
parent
efebd24467
commit
cd9e3856a1
7
pom.xml
7
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>cn.lunadeer</groupId>
|
<groupId>cn.lunadeer</groupId>
|
||||||
<artifactId>Dominion</artifactId>
|
<artifactId>Dominion</artifactId>
|
||||||
<version>1.26.0-beta</version>
|
<version>1.26.2-beta</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Dominion</name>
|
<name>Dominion</name>
|
||||||
@ -96,10 +96,5 @@
|
|||||||
<version>1.7</version>
|
<version>1.7</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>fastjson</artifactId>
|
|
||||||
<version>2.0.31</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
@ -16,8 +16,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
|
|
||||||
import static cn.lunadeer.dominion.events.Apis.checkFlag;
|
|
||||||
|
|
||||||
public class Cache {
|
public class Cache {
|
||||||
|
|
||||||
public Cache() {
|
public Cache() {
|
||||||
@ -203,6 +201,12 @@ public class Cache {
|
|||||||
if (!Flag.FLY.getEnable()) {
|
if (!Flag.FLY.getEnable()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (player.getGameMode() == GameMode.CREATIVE || player.getGameMode() == GameMode.SPECTATOR) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (player.isOp() && Dominion.config.getLimitOpBypass()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (dominion == null) {
|
if (dominion == null) {
|
||||||
player.setAllowFlight(false);
|
player.setAllowFlight(false);
|
||||||
return;
|
return;
|
||||||
|
@ -2,11 +2,9 @@ package cn.lunadeer.dominion.dtos;
|
|||||||
|
|
||||||
import cn.lunadeer.dominion.Dominion;
|
import cn.lunadeer.dominion.Dominion;
|
||||||
import cn.lunadeer.minecraftpluginutils.JsonFile;
|
import cn.lunadeer.minecraftpluginutils.JsonFile;
|
||||||
import cn.lunadeer.minecraftpluginutils.XLogger;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -1,16 +1,13 @@
|
|||||||
package cn.lunadeer.dominion.events;
|
package cn.lunadeer.dominion.events;
|
||||||
|
|
||||||
import cn.lunadeer.dominion.Cache;
|
import cn.lunadeer.dominion.Cache;
|
||||||
import cn.lunadeer.dominion.Dominion;
|
|
||||||
import cn.lunadeer.dominion.dtos.DominionDTO;
|
import cn.lunadeer.dominion.dtos.DominionDTO;
|
||||||
import cn.lunadeer.dominion.dtos.Flag;
|
import cn.lunadeer.dominion.dtos.Flag;
|
||||||
import cn.lunadeer.dominion.dtos.PlayerDTO;
|
import cn.lunadeer.dominion.dtos.PlayerDTO;
|
||||||
import cn.lunadeer.dominion.dtos.PlayerPrivilegeDTO;
|
|
||||||
import io.papermc.paper.event.entity.EntityDyeEvent;
|
import io.papermc.paper.event.entity.EntityDyeEvent;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.data.BlockData;
|
|
||||||
import org.bukkit.entity.*;
|
import org.bukkit.entity.*;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
@ -28,7 +25,6 @@ import org.bukkit.event.inventory.InventoryType;
|
|||||||
import org.bukkit.event.player.*;
|
import org.bukkit.event.player.*;
|
||||||
import org.bukkit.event.vehicle.VehicleDestroyEvent;
|
import org.bukkit.event.vehicle.VehicleDestroyEvent;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.material.Button;
|
|
||||||
import org.spigotmc.event.entity.EntityMountEvent;
|
import org.spigotmc.event.entity.EntityMountEvent;
|
||||||
|
|
||||||
import static cn.lunadeer.dominion.events.Apis.checkFlag;
|
import static cn.lunadeer.dominion.events.Apis.checkFlag;
|
||||||
|
Loading…
Reference in New Issue
Block a user