Skip to content

Commit

Permalink
refactor: 更改包名
Browse files Browse the repository at this point in the history
  • Loading branch information
HowieHz committed Jul 4, 2024
1 parent 535281f commit f5fe937
Show file tree
Hide file tree
Showing 32 changed files with 116 additions and 117 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

version = '0.2.6'
mainClassName = 'com.hzzz.points.Points'
mainClassName = 'top.howiehz.points.Points'

repositories {
// mavenLocal() 自己电脑的缓存
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.hzzz.points;

import com.hzzz.points.commands.*;
import com.hzzz.points.data_manager.sqlite.ConfigSQLite;
import com.hzzz.points.data_manager.sqlite.DeathLogSQLite;
import com.hzzz.points.listeners.AntiBoomListener;
import com.hzzz.points.listeners.DeathListener;
import com.hzzz.points.listeners.base_listener.NamedListener;
import com.hzzz.points.utils.base_utils_class.BaseUtilsClass;
import com.hzzz.points.utils.data_structure.CommandInfo;
import com.hzzz.points.utils.data_structure.tuple.Tuple4;
import com.hzzz.points.utils.github_update_checker.UpdateChecker;
package top.howiehz.points;

import top.howiehz.points.commands.*;
import top.howiehz.points.data_manager.sqlite.ConfigSQLite;
import top.howiehz.points.data_manager.sqlite.DeathLogSQLite;
import top.howiehz.points.listeners.AntiBoomListener;
import top.howiehz.points.listeners.DeathListener;
import top.howiehz.points.listeners.base_listener.NamedListener;
import top.howiehz.points.utils.base_utils_class.BaseUtilsClass;
import top.howiehz.points.utils.data_structure.CommandInfo;
import top.howiehz.points.utils.data_structure.tuple.Tuple4;
import top.howiehz.points.utils.github_update_checker.UpdateChecker;
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
Expand All @@ -24,10 +24,10 @@
import java.util.Objects;
import java.util.logging.Logger;

import static com.hzzz.points.utils.Utils.*;
import static com.hzzz.points.utils.message.Lang.getMessage;
import static com.hzzz.points.utils.message.Lang.reloadLangConfig;
import static com.hzzz.points.utils.message.MsgKey.*;
import static top.howiehz.points.utils.Utils.*;
import static top.howiehz.points.utils.message.Lang.getMessage;
import static top.howiehz.points.utils.message.Lang.reloadLangConfig;
import static top.howiehz.points.utils.message.MsgKey.*;

/**
* <p>插件主类</p>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hzzz.points.commands;
package top.howiehz.points.commands;

import com.hzzz.points.commands.base_executor.HowieUtilsExecutor;
import top.howiehz.points.commands.base_executor.HowieUtilsExecutor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
Expand All @@ -9,12 +9,12 @@
import java.sql.SQLException;
import java.util.*;

import static com.hzzz.points.data_manager.operations_utils.DeathLog.outputDeathLog;
import static com.hzzz.points.data_manager.operations_utils.DeathMessageConfig.updateDeathMessageConfig;
import static com.hzzz.points.utils.Utils.logError;
import static com.hzzz.points.utils.Utils.runTaskAsynchronously;
import static com.hzzz.points.utils.message.Lang.getMessage;
import static com.hzzz.points.utils.message.MsgKey.*;
import static top.howiehz.points.data_manager.operations_utils.DeathLog.outputDeathLog;
import static top.howiehz.points.data_manager.operations_utils.DeathMessageConfig.updateDeathMessageConfig;
import static top.howiehz.points.utils.Utils.logError;
import static top.howiehz.points.utils.Utils.runTaskAsynchronously;
import static top.howiehz.points.utils.message.Lang.getMessage;
import static top.howiehz.points.utils.message.MsgKey.*;

/**
* death指令的执行器以及tab补全
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hzzz.points.commands;
package top.howiehz.points.commands;

import com.hzzz.points.commands.base_executor.HowieUtilsExecutor;
import top.howiehz.points.commands.base_executor.HowieUtilsExecutor;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
Expand All @@ -10,8 +10,8 @@
import java.util.Collections;
import java.util.List;

import static com.hzzz.points.utils.message.Lang.getMessage;
import static com.hzzz.points.utils.message.MsgKey.*;
import static top.howiehz.points.utils.message.Lang.getMessage;
import static top.howiehz.points.utils.message.MsgKey.*;

/**
* <p>随身潜影箱</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hzzz.points.commands;
package top.howiehz.points.commands;

import com.hzzz.points.commands.base_executor.HowieUtilsExecutor;
import top.howiehz.points.commands.base_executor.HowieUtilsExecutor;
import me.clip.placeholderapi.PlaceholderAPI;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
Expand All @@ -12,9 +12,9 @@
import java.util.Collections;
import java.util.List;

import static com.hzzz.points.utils.Utils.executeCommand;
import static com.hzzz.points.utils.message.Lang.getMessage;
import static com.hzzz.points.utils.message.MsgKey.*;
import static top.howiehz.points.utils.Utils.executeCommand;
import static top.howiehz.points.utils.message.Lang.getMessage;
import static top.howiehz.points.utils.message.MsgKey.*;

/**
* <p>fair pvp</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hzzz.points.commands;
package top.howiehz.points.commands;

import com.hzzz.points.commands.base_executor.HowieUtilsExecutor;
import top.howiehz.points.commands.base_executor.HowieUtilsExecutor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
Expand All @@ -14,10 +14,10 @@
import java.util.Collections;
import java.util.List;

import static com.hzzz.points.utils.Utils.sendComponentMessageToPlayers;
import static com.hzzz.points.utils.message.Lang.getMessage;
import static com.hzzz.points.utils.message.MsgKey.NO_PERMISSION;
import static com.hzzz.points.utils.message.MsgKey.PLAYER_ONLY;
import static top.howiehz.points.utils.Utils.sendComponentMessageToPlayers;
import static top.howiehz.points.utils.message.Lang.getMessage;
import static top.howiehz.points.utils.message.MsgKey.NO_PERMISSION;
import static top.howiehz.points.utils.message.MsgKey.PLAYER_ONLY;

/**
* here指令的执行器以及tab补全
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hzzz.points.commands;
package top.howiehz.points.commands;

import com.hzzz.points.Points;
import com.hzzz.points.commands.base_executor.HowieUtilsExecutor;
import top.howiehz.points.Points;
import top.howiehz.points.commands.base_executor.HowieUtilsExecutor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
Expand All @@ -10,9 +10,9 @@
import java.util.ArrayList;
import java.util.List;

import static com.hzzz.points.utils.Utils.logInfo;
import static com.hzzz.points.utils.message.Lang.getMessage;
import static com.hzzz.points.utils.message.MsgKey.*;
import static top.howiehz.points.utils.Utils.logInfo;
import static top.howiehz.points.utils.message.Lang.getMessage;
import static top.howiehz.points.utils.message.MsgKey.*;

/**
* points指令的执行器以及tab补全
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hzzz.points.commands;
package top.howiehz.points.commands;

import com.hzzz.points.commands.base_executor.HowieUtilsExecutor;
import top.howiehz.points.commands.base_executor.HowieUtilsExecutor;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
Expand All @@ -10,9 +10,9 @@
import java.util.Collections;
import java.util.List;

import static com.hzzz.points.utils.Utils.sendComponentMessage;
import static com.hzzz.points.utils.message.Lang.getMessage;
import static com.hzzz.points.utils.message.MsgKey.*;
import static top.howiehz.points.utils.Utils.sendComponentMessage;
import static top.howiehz.points.utils.message.Lang.getMessage;
import static top.howiehz.points.utils.message.MsgKey.*;

/**
* where指令的执行器以及tab补全
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hzzz.points.commands.base_executor;
package top.howiehz.points.commands.base_executor;

import com.hzzz.points.utils.base_utils_class.BaseUtilsClass;
import top.howiehz.points.utils.base_utils_class.BaseUtilsClass;
import org.bukkit.command.TabExecutor;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hzzz.points.data_manager.operations_utils;
package top.howiehz.points.data_manager.operations_utils;

import com.hzzz.points.data_manager.sqlite.DeathLogSQLite;
import top.howiehz.points.data_manager.sqlite.DeathLogSQLite;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.event.ClickEvent;
import net.kyori.adventure.text.event.HoverEvent;
Expand All @@ -17,9 +17,9 @@
import java.text.SimpleDateFormat;
import java.util.UUID;

import static com.hzzz.points.utils.Utils.*;
import static com.hzzz.points.utils.message.Lang.getMessage;
import static com.hzzz.points.utils.message.MsgKey.*;
import static top.howiehz.points.utils.Utils.*;
import static top.howiehz.points.utils.message.Lang.getMessage;
import static top.howiehz.points.utils.message.MsgKey.*;

/**
* 有关DeathLog的数据库操作
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hzzz.points.data_manager.operations_utils;
package top.howiehz.points.data_manager.operations_utils;

import com.hzzz.points.data_manager.sqlite.ConfigSQLite;
import top.howiehz.points.data_manager.sqlite.ConfigSQLite;
import org.bukkit.entity.Player;

import java.sql.PreparedStatement;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.hzzz.points.data_manager.sqlite;
package top.howiehz.points.data_manager.sqlite;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

import static com.hzzz.points.utils.message.Lang.getMessage;
import static com.hzzz.points.utils.Utils.logError;
import static com.hzzz.points.utils.message.MsgKey.DATABASE_DRIVER_ERROR;
import static top.howiehz.points.utils.message.Lang.getMessage;
import static top.howiehz.points.utils.Utils.logError;
import static top.howiehz.points.utils.message.MsgKey.DATABASE_DRIVER_ERROR;

/**
* <p>sqlite数据库对象 基类</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.hzzz.points.data_manager.sqlite;
package top.howiehz.points.data_manager.sqlite;

import java.sql.PreparedStatement;
import java.sql.SQLException;

import static com.hzzz.points.utils.message.Lang.getMessage;
import static com.hzzz.points.utils.Utils.logError;
import static com.hzzz.points.utils.message.MsgKey.DATABASE_SETUP_ERROR;
import static top.howiehz.points.utils.message.Lang.getMessage;
import static top.howiehz.points.utils.Utils.logError;
import static top.howiehz.points.utils.message.MsgKey.DATABASE_SETUP_ERROR;

/**
* 管理config.sqlite
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.hzzz.points.data_manager.sqlite;
package top.howiehz.points.data_manager.sqlite;

import java.sql.PreparedStatement;
import java.sql.SQLException;

import static com.hzzz.points.utils.message.Lang.getMessage;
import static com.hzzz.points.utils.Utils.logError;
import static com.hzzz.points.utils.message.MsgKey.DATABASE_SETUP_ERROR;
import static top.howiehz.points.utils.message.Lang.getMessage;
import static top.howiehz.points.utils.Utils.logError;
import static top.howiehz.points.utils.message.MsgKey.DATABASE_SETUP_ERROR;

/**
* 管理death_log.sqlite
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.hzzz.points.listeners;
package top.howiehz.points.listeners;

import com.google.common.collect.ImmutableList;
import com.hzzz.points.listeners.base_listener.HowieUtilsListener;
import com.hzzz.points.utils.data_structure.AntiBoomInfo;
import top.howiehz.points.listeners.base_listener.HowieUtilsListener;
import top.howiehz.points.utils.data_structure.AntiBoomInfo;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
Expand All @@ -13,12 +13,11 @@
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.jetbrains.annotations.NotNull;
import top.howiehz.points.utils.message.MsgKey;

import java.util.Objects;

import static com.hzzz.points.utils.message.Lang.getMessage;
import static com.hzzz.points.utils.message.MsgKey.ENTER_BED_CANCELED;
import static com.hzzz.points.utils.message.MsgKey.USE_RESPAWN_ANCHOR_CANCELED;
import static top.howiehz.points.utils.message.Lang.getMessage;
import static org.bukkit.Material.*;

/**
Expand Down Expand Up @@ -153,11 +152,11 @@ public void onBadOrRespawnAnchor(@NotNull PlayerInteractEvent e) {
if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { // 是不是右手
if (Objects.requireNonNull(e.getClickedBlock()).getType().equals(RESPAWN_ANCHOR)) { // 是不是重生锚
if (checkWorldConfig(e, "anti-boom.respawn-anchor", worldName)) {
player.sendMessage(getMessage(USE_RESPAWN_ANCHOR_CANCELED));
player.sendMessage(getMessage(MsgKey.USE_RESPAWN_ANCHOR_CANCELED));
}
} else if (bedsList.contains(e.getClickedBlock().getType())) { // 是不是床
if (checkWorldConfig(e, "anti-boom.bed", worldName)) {
player.sendMessage(getMessage(ENTER_BED_CANCELED));
player.sendMessage(getMessage(MsgKey.ENTER_BED_CANCELED));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package com.hzzz.points.listeners;
package top.howiehz.points.listeners;

import com.hzzz.points.listeners.base_listener.HowieUtilsListener;
import top.howiehz.points.listeners.base_listener.HowieUtilsListener;
import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.jetbrains.annotations.NotNull;
import top.howiehz.points.data_manager.operations_utils.DeathLog;
import top.howiehz.points.data_manager.operations_utils.DeathMessageConfig;
import top.howiehz.points.utils.Utils;

import java.sql.SQLException;

import static com.hzzz.points.data_manager.operations_utils.DeathLog.insertDeathLog;
import static com.hzzz.points.data_manager.operations_utils.DeathMessageConfig.isEnableDeathMessage;
import static com.hzzz.points.utils.Utils.runTaskAsynchronously;
import static com.hzzz.points.utils.Utils.sendComponentMessage;
import static top.howiehz.points.utils.Utils.sendComponentMessage;

/**
* 玩家死亡事件监听器
Expand Down Expand Up @@ -59,12 +59,12 @@ public void onPlayerDeath(@NotNull PlayerDeathEvent e) {
if (!checkPermissionOneConfigNode(player, "death.message.listener", "points.listener.death.message")) {
return;
}
runTaskAsynchronously(() -> {
Utils.runTaskAsynchronously(() -> {
// isEnableDeathMessage insertDeathLog需要异步
try {
if (config.getBoolean("death.message.enable", false) && isEnableDeathMessage(player)) { // 出现错误默认不发送死亡消息
if (config.getBoolean("death.message.enable", false) && DeathMessageConfig.isEnableDeathMessage(player)) { // 出现错误默认不发送死亡消息
// 生成并发送消息给执行者
sendComponentMessage(player,buildPlayerCoordinatesMessage("death.message", player, " X-> ", NamedTextColor.RED));
Utils.sendComponentMessage(player,buildPlayerCoordinatesMessage("death.message", player, " X-> ", NamedTextColor.RED));
}
} catch (SQLException ex) {
ex.printStackTrace();
Expand All @@ -76,7 +76,7 @@ public void onPlayerDeath(@NotNull PlayerDeathEvent e) {
if (deathMessage == null) { // 被手动设置deathMessage才可能为null吧
return;
}
insertDeathLog(player, deathMessage, config.getInt("death.log.record-limit", 5));
DeathLog.insertDeathLog(player, deathMessage, config.getInt("death.log.record-limit", 5));
}
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hzzz.points.listeners.base_listener;
package top.howiehz.points.listeners.base_listener;

import com.hzzz.points.utils.base_utils_class.BaseUtilsClass;
import top.howiehz.points.utils.base_utils_class.BaseUtilsClass;

/**
* <p></p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.hzzz.points.listeners.base_listener;
package top.howiehz.points.listeners.base_listener;

import org.bukkit.event.Listener;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hzzz.points.utils;
package top.howiehz.points.utils;

import com.hzzz.points.Points;
import top.howiehz.points.Points;
import net.kyori.adventure.text.Component;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
Expand Down
Loading

0 comments on commit f5fe937

Please sign in to comment.