Compare commits
No commits in common. "master" and "v2.4.3.2" have entirely different histories.
@ -37,7 +37,7 @@ jobs:
|
||||
- name: "Release"
|
||||
uses: https://ssl.lunadeer.cn:14446/zhangyuheng/release-action@main
|
||||
with:
|
||||
note: "带 `original-` 前缀的文件无法用于运行,请下载不带此前缀的版本。"
|
||||
note: "提示:带 ‘original-’ 前缀的文件无法用于运行,请下载不带此前缀的版本。"
|
||||
files: |-
|
||||
staging/*.jar
|
||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>LiteWorldEdit</artifactId>
|
||||
<version>2.4.3.8</version>
|
||||
<version>2.4.3.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>LiteWorldEdit</name>
|
||||
|
@ -87,11 +87,7 @@ public class GiteaReleaseCheck {
|
||||
LoggerX.debug("HTML URL: " + latest_release.html_url);
|
||||
if (isNewVersion(current_version, latest_release.tag_name)) {
|
||||
LoggerX.info("发现新版本:" + latest_release.tag_name);
|
||||
LoggerX.info("版本信息:");
|
||||
String[] message = latest_release.message.split("\n");
|
||||
for (String line : message) {
|
||||
LoggerX.info("\t" + line);
|
||||
}
|
||||
LoggerX.info("版本信息:" + latest_release.message);
|
||||
LoggerX.info("下载页面:" + latest_release.html_url);
|
||||
} else {
|
||||
LoggerX.info("当前已是最新版本:" + current_version);
|
||||
|
@ -1,7 +1,10 @@
|
||||
package cn.lunadeer.liteworldedit.Jobs;
|
||||
|
||||
import cn.lunadeer.liteworldedit.LoggerX;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
@ -37,23 +40,9 @@ public class Absorb extends Job {
|
||||
// 模拟海绵吸水事件
|
||||
BlockPlaceEvent event = new BlockPlaceEvent(raw_block, raw_block.getState(), raw_block, new ItemStack(Material.SPONGE), _creator, true, null);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
// 获取玩家背包中的下届合金镐
|
||||
HashMap<Integer, ?> pickaxes = getNetherPickaxes(_creator);
|
||||
if (pickaxes.size() == 0) {
|
||||
return JobErrCode.NO_PICKAXE;
|
||||
}
|
||||
ItemStack pickaxe = getUsableNetherPickaxe(pickaxes, _creator);
|
||||
// 没有合适的镐
|
||||
if (pickaxe == null) {
|
||||
return JobErrCode.NOT_ENOUGH_DURATION;
|
||||
}
|
||||
if (!event.isCancelled()) {
|
||||
raw_block.setType(Material.SPONGE);
|
||||
raw_block.setType(Material.AIR);
|
||||
// 损坏镐
|
||||
if (!_creator.isOp() && _creator.getGameMode() != GameMode.CREATIVE) {
|
||||
useNetherPickaxe(pickaxe);
|
||||
}
|
||||
return JobErrCode.OK;
|
||||
} else {
|
||||
return JobErrCode.NO_PERMISSION;
|
||||
|
@ -1,7 +1,10 @@
|
||||
package cn.lunadeer.liteworldedit.Jobs;
|
||||
|
||||
import cn.lunadeer.liteworldedit.LoggerX;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.ShulkerBox;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -72,9 +75,7 @@ public class Place extends Job {
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
raw_block.setType(_block);
|
||||
if (!_creator.isOp() && _creator.getGameMode() != GameMode.CREATIVE) {
|
||||
stack.setAmount(stack.getAmount() - 1);
|
||||
}
|
||||
return JobErrCode.OK;
|
||||
} else {
|
||||
return JobErrCode.NO_PERMISSION;
|
||||
|
@ -2,7 +2,10 @@ package cn.lunadeer.liteworldedit.Jobs;
|
||||
|
||||
import cn.lunadeer.liteworldedit.LiteWorldEdit;
|
||||
import cn.lunadeer.liteworldedit.LoggerX;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
@ -45,15 +48,12 @@ public class Remove extends Job {
|
||||
BlockBreakEvent event = new BlockBreakEvent(raw_block, _creator);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
Material block_type = raw_block.getType();
|
||||
raw_block.setType(Material.AIR);
|
||||
if (LiteWorldEdit.instance.getConfigMgr().isDropItems()) {
|
||||
raw_block.getWorld().dropItemNaturally(raw_block.getLocation(), new ItemStack(block_type));
|
||||
raw_block.getWorld().dropItemNaturally(raw_block.getLocation(), new ItemStack(raw_block.getType()));
|
||||
}
|
||||
// 损坏镐
|
||||
if (!_creator.isOp() && _creator.getGameMode() != GameMode.CREATIVE) {
|
||||
useNetherPickaxe(pickaxe);
|
||||
}
|
||||
return JobErrCode.OK;
|
||||
} else {
|
||||
return JobErrCode.NO_PERMISSION;
|
||||
|
@ -2,11 +2,6 @@ package cn.lunadeer.liteworldedit;
|
||||
|
||||
import cn.lunadeer.liteworldedit.Jobs.Job;
|
||||
import cn.lunadeer.liteworldedit.Jobs.JobErrCode;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.TextComponent;
|
||||
import net.kyori.adventure.text.format.Style;
|
||||
import net.kyori.adventure.text.format.TextColor;
|
||||
import net.kyori.adventure.text.format.TextDecoration;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class Task implements Runnable {
|
||||
@ -45,8 +40,7 @@ public class Task implements Runnable {
|
||||
}
|
||||
Player player = job.get_creator();
|
||||
if (re.canContinue()) {
|
||||
TextComponent warn = Component.text("警告:" + re.getMessage(), Style.style(TextColor.color(TextColor.color(255, 185, 69)), TextDecoration.BOLD));
|
||||
player.sendActionBar(warn);
|
||||
Notification.titleWarn(player, "警告", re.getMessage());
|
||||
job = this.xPlayer.popJob();
|
||||
if (job == null) {
|
||||
return;
|
||||
|
@ -12,10 +12,4 @@ commands:
|
||||
LiteWorldEdit:
|
||||
description: 简易创世神命令
|
||||
usage: /lwe <cmd>
|
||||
aliases: [ lwe ]
|
||||
permission: lwe.command
|
||||
permission-message: 你没有权限使用这个命令。
|
||||
permissions:
|
||||
lwe.command:
|
||||
description: 是否允许使用 LiteWorldEdit
|
||||
default: true
|
||||
aliases: [lwe]
|
Loading…
Reference in New Issue
Block a user