-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
40 changed files
with
3,489 additions
and
1,736 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,6 @@ log/ | |
.DS_Store | ||
|
||
# others | ||
*.jar | ||
*.war | ||
*.zip | ||
*.tar | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.linear</groupId> | ||
<artifactId>LinearBot</artifactId> | ||
<version>1.2.1</version> | ||
</parent> | ||
|
||
<artifactId>LinearBot-bukkit</artifactId> | ||
|
||
<properties> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>11</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<repositories> | ||
<repository> | ||
<id>jitpack.io</id> | ||
<url>https://jitpack.io</url> | ||
</repository> | ||
<repository> | ||
<id>placeholderapi</id> | ||
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url> | ||
</repository> | ||
<repository> | ||
<id>purpur</id> | ||
<url>https://repo.purpurmc.org/snapshots</url> | ||
</repository> | ||
<repository> | ||
<id>codemc-repo</id> | ||
<url>https://repo.codemc.io/repository/maven-public/</url> | ||
</repository> | ||
<repository> | ||
<id>quickshop-repo</id> | ||
<url>https://repo.codemc.io/repository/maven-public/</url> | ||
</repository> | ||
<repository> | ||
<id>griefdefender</id> | ||
<url>https://repo.glaremasters.me/repository/bloodshot</url> | ||
</repository> | ||
<!-- | ||
<repository> | ||
<id>spigotmc-repo</id> | ||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> | ||
</repository> | ||
<repository> | ||
<id>sonatype</id> | ||
<url>https://oss.sonatype.org/content/groups/public/</url> | ||
</repository> | ||
--> | ||
</repositories> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.purpurmc.purpur</groupId> | ||
<artifactId>purpur-api</artifactId> | ||
<version>1.16.5-R0.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>me.clip</groupId> | ||
<artifactId>placeholderapi</artifactId> | ||
<version>2.10.3</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>fr.xephi</groupId> | ||
<artifactId>authme</artifactId> | ||
<version>5.6.0-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.maxgamer</groupId> | ||
<artifactId>QuickShop</artifactId> | ||
<version>5.1.1.2</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.ghostchu</groupId> | ||
<artifactId>quickshop-bukkit</artifactId> | ||
<version>3.6.1.5</version> | ||
<scope>provided</scope> | ||
<classifier>shaded</classifier> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.griefdefender</groupId> | ||
<artifactId>api</artifactId> | ||
<version>2.1.0-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.bekvon.bukkit.residence</groupId> | ||
<artifactId>Residence</artifactId> | ||
<version>5.1.0.1</version> | ||
<scope>system</scope> | ||
<systemPath>${project.basedir}/lib/Residence5.1.0.1.jar</systemPath> | ||
</dependency> | ||
<!-- | ||
<dependency> | ||
<groupId>org.bstats</groupId> | ||
<artifactId>bstats-bukkit</artifactId> | ||
<version>3.0.0</version> | ||
<scope>compile</scope> | ||
</dependency>--> | ||
</dependencies> | ||
|
||
|
||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
...in/java/org/linear/linearbot/bot/Bot.java → ...in/java/org/linear/linearbot/bot/Bot.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
package org.linear.linearbot.bot; | ||
|
||
import org.linear.linearbot.config.Config; | ||
import me.dreamvoid.miraimc.api.MiraiBot; | ||
|
||
public class Bot { | ||
public static void sendMsg(String msg,long groupID){ | ||
MiraiBot.getBot(Config.getBotQQ()).getGroup(groupID).sendMessageMirai(msg); | ||
} | ||
} | ||
package org.linear.linearbot.bot; | ||
|
||
import org.linear.linearbot.config.Config; | ||
import me.dreamvoid.miraimc.api.MiraiBot; | ||
|
||
public class Bot { | ||
public static void sendMsg(String msg,long groupID){ | ||
MiraiBot.getBot(Config.getBotQQ()).getGroup(groupID).sendMessageMirai(msg); | ||
} | ||
} |
140 changes: 70 additions & 70 deletions
140
...rg/linear/linearbot/command/Commands.java → ...rg/linear/linearbot/command/Commands.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,70 @@ | ||
package org.linear.linearbot.command; | ||
|
||
import org.linear.linearbot.config.Config; | ||
|
||
import org.bukkit.command.Command; | ||
import org.bukkit.command.CommandExecutor; | ||
import org.bukkit.command.CommandSender; | ||
|
||
public class Commands implements CommandExecutor{ | ||
|
||
@Override | ||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { | ||
|
||
if (args.length == 0) { | ||
sender.sendMessage("请使用/lb help查看命令使用方法"); | ||
return true; | ||
} | ||
|
||
if(args.length != 0) { | ||
switch (args[0]) { | ||
/* | ||
case "bind": | ||
if (args.length != 2) return true; | ||
if (!(sender instanceof Player)) { | ||
sender.sendMessage(ConfigManager.getMessage_Server("ArgsError")); | ||
return true; | ||
} | ||
Player player = (Player) sender; | ||
try { | ||
long qq = Long.parseLong(args[1]); | ||
if (ConfigManager.getBindUser().containsKey(qq)) { | ||
player.sendMessage(ConfigManager.getMessage_Server("QQReapt")); | ||
return true; | ||
} | ||
player.sendMessage(ConfigManager.getMessage_Server("ChangeBind") | ||
.replaceAll("%qq%", String.valueOf(qq))); | ||
for (long group : ConfigManager.getGroups()) { | ||
Bot.getMiraiBot() | ||
.getGroup(group) | ||
.sendMessage(ConfigManager.getMessage_QQ("ChangeBind") | ||
.replaceAll("%qq%", String.valueOf(qq)) | ||
.replaceAll("%player%", player.getName())); | ||
} | ||
PlayerData.changeBind(player.getName(), qq); | ||
return true; | ||
} catch (Exception ex) { | ||
ex.printStackTrace(); | ||
player.sendMessage(ConfigManager.getMessage_Server("ArgsError")); | ||
} | ||
break;*/ | ||
case "reload": | ||
if (args.length != 1) return true; | ||
Config.loadConfig(); | ||
sender.sendMessage("LinearBot配置文件已重载"); | ||
break; | ||
case "help": | ||
if (args.length != 1) return true; | ||
sender.sendMessage("§6LinearBot 机器人帮助菜单"); | ||
sender.sendMessage("§6/lb reload :§f重载插件"); | ||
sender.sendMessage("§6/lb help :§f获取插件帮助"); | ||
break; | ||
default: | ||
if (args.length != 1) return true; | ||
sender.sendMessage("错误的指令用法,请使用/lb help查看命令使用方法"); | ||
break; | ||
} | ||
} | ||
return true; | ||
} | ||
} | ||
package org.linear.linearbot.command; | ||
|
||
import org.linear.linearbot.config.Config; | ||
|
||
import org.bukkit.command.Command; | ||
import org.bukkit.command.CommandExecutor; | ||
import org.bukkit.command.CommandSender; | ||
|
||
public class Commands implements CommandExecutor{ | ||
|
||
@Override | ||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { | ||
|
||
if (args.length == 0) { | ||
sender.sendMessage("请使用/lb help查看命令使用方法"); | ||
return true; | ||
} | ||
|
||
if(args.length != 0) { | ||
switch (args[0]) { | ||
/* | ||
case "bind": | ||
if (args.length != 2) return true; | ||
if (!(sender instanceof Player)) { | ||
sender.sendMessage(ConfigManager.getMessage_Server("ArgsError")); | ||
return true; | ||
} | ||
Player player = (Player) sender; | ||
try { | ||
long qq = Long.parseLong(args[1]); | ||
if (ConfigManager.getBindUser().containsKey(qq)) { | ||
player.sendMessage(ConfigManager.getMessage_Server("QQReapt")); | ||
return true; | ||
} | ||
player.sendMessage(ConfigManager.getMessage_Server("ChangeBind") | ||
.replaceAll("%qq%", String.valueOf(qq))); | ||
for (long group : ConfigManager.getGroups()) { | ||
Bot.getMiraiBot() | ||
.getGroup(group) | ||
.sendMessage(ConfigManager.getMessage_QQ("ChangeBind") | ||
.replaceAll("%qq%", String.valueOf(qq)) | ||
.replaceAll("%player%", player.getName())); | ||
} | ||
PlayerData.changeBind(player.getName(), qq); | ||
return true; | ||
} catch (Exception ex) { | ||
ex.printStackTrace(); | ||
player.sendMessage(ConfigManager.getMessage_Server("ArgsError")); | ||
} | ||
break;*/ | ||
case "reload": | ||
if (args.length != 1) return true; | ||
Config.loadConfig(); | ||
sender.sendMessage("LinearBot配置文件已重载"); | ||
break; | ||
case "help": | ||
if (args.length != 1) return true; | ||
sender.sendMessage("§6LinearBot 机器人帮助菜单"); | ||
sender.sendMessage("§6/lb reload :§f重载插件"); | ||
sender.sendMessage("§6/lb help :§f获取插件帮助"); | ||
break; | ||
default: | ||
if (args.length != 1) return true; | ||
sender.sendMessage("错误的指令用法,请使用/lb help查看命令使用方法"); | ||
break; | ||
} | ||
} | ||
return true; | ||
} | ||
} |
Oops, something went wrong.