forked from Upstream/CommandPanels
bungee command support
This commit is contained in:
parent
e58adfa9f5
commit
86aecb856a
30
.gitea/workflows/build.yml
Normal file
30
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: Build CommandPanels plugin
|
||||||
|
run-name: Build CommandPanels plugin
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
Build-latest-jar:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Build | Prepare packages
|
||||||
|
run: |
|
||||||
|
apt update; apt-get install software-properties-common -y
|
||||||
|
wget -O- https://apt.corretto.aws/corretto.key | apt-key add -
|
||||||
|
add-apt-repository 'deb https://apt.corretto.aws stable main'
|
||||||
|
apt-get update; apt-get install -y maven java-21-amazon-corretto-jdk
|
||||||
|
- name: Setup git
|
||||||
|
run: |
|
||||||
|
git config --global user.name "Radim Lipovčan"
|
||||||
|
git config --global user.email "radim@lipovcan.cz"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Build | Maven clean build
|
||||||
|
run: |
|
||||||
|
mvn clean install && ls -lah && ls */ -lah && ls */* -lah&& ls */*/* -lah
|
||||||
|
- name: Push | Create release
|
||||||
|
uses: https://git.lipovcan.cz/Upstream/gitea-release-action.git@v1
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
target/CommandPanels-DEV.jar
|
||||||
|
- name: Push | Old FTP way to gitea.lipovcan.cz:8081
|
||||||
|
run: |
|
||||||
|
curl --insecure --user username:mypass -T ./target/CommandPanels-DEV.jar ftp://192.168.10.133:/
|
@ -66,11 +66,21 @@
|
|||||||
<option name="name" value="BenCodez Repo" />
|
<option name="name" value="BenCodez Repo" />
|
||||||
<option name="url" value="https://nexus.bencodez.com/repository/maven-public/" />
|
<option name="url" value="https://nexus.bencodez.com/repository/maven-public/" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="central" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="oraxen" />
|
<option name="id" value="oraxen" />
|
||||||
<option name="name" value="Oraxen Repository" />
|
<option name="name" value="Oraxen Repository" />
|
||||||
<option name="url" value="https://repo.oraxen.com/releases" />
|
<option name="url" value="https://repo.oraxen.com/releases" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="github" />
|
||||||
|
<option name="name" value="github" />
|
||||||
|
<option name="url" value="https://maven.pkg.github.com/xap3y/skullcreator" />
|
||||||
|
</remote-repository>
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="jitpack-repo" />
|
<option name="id" value="jitpack-repo" />
|
||||||
<option name="name" value="jitpack-repo" />
|
<option name="name" value="jitpack-repo" />
|
||||||
|
4
pom.xml
4
pom.xml
@ -4,7 +4,7 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>groupId</groupId>
|
<groupId>me.rockyhawk.commandpanels</groupId>
|
||||||
<artifactId>CommandPanels</artifactId>
|
<artifactId>CommandPanels</artifactId>
|
||||||
<version>DEV</version>
|
<version>DEV</version>
|
||||||
|
|
||||||
@ -163,7 +163,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.clip</groupId>
|
<groupId>me.clip</groupId>
|
||||||
<artifactId>placeholderapi</artifactId>
|
<artifactId>placeholderapi</artifactId>
|
||||||
<version>2.11.3</version>
|
<version>2.11.6</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -168,6 +168,7 @@ public class CommandPanels extends JavaPlugin{
|
|||||||
new Metrics(this, 5097);
|
new Metrics(this, 5097);
|
||||||
this.setupEconomy();
|
this.setupEconomy();
|
||||||
this.getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
|
this.getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
|
||||||
|
this.getServer().getMessenger().registerOutgoingPluginChannel(this, "my:psb");
|
||||||
Objects.requireNonNull(this.getCommand("commandpanel")).setExecutor(new Commandpanel(this));
|
Objects.requireNonNull(this.getCommand("commandpanel")).setExecutor(new Commandpanel(this));
|
||||||
Objects.requireNonNull(this.getCommand("commandpanel")).setTabCompleter(new CpTabComplete(this));
|
Objects.requireNonNull(this.getCommand("commandpanel")).setTabCompleter(new CpTabComplete(this));
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package me.rockyhawk.commandpanels.commandtags.tags.standard;
|
package me.rockyhawk.commandpanels.commandtags.tags.standard;
|
||||||
|
|
||||||
|
import com.google.common.io.ByteArrayDataOutput;
|
||||||
|
import com.google.common.io.ByteStreams;
|
||||||
import me.rockyhawk.commandpanels.CommandPanels;
|
import me.rockyhawk.commandpanels.CommandPanels;
|
||||||
import me.rockyhawk.commandpanels.api.PanelCommandEvent;
|
import me.rockyhawk.commandpanels.api.PanelCommandEvent;
|
||||||
import me.rockyhawk.commandpanels.classresources.MiniMessageUtils;
|
import me.rockyhawk.commandpanels.classresources.MiniMessageUtils;
|
||||||
@ -69,6 +71,18 @@ public class BasicTags implements Listener {
|
|||||||
e.p.chat("/" + String.join(" ",e.args));
|
e.p.chat("/" + String.join(" ",e.args));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (e.name.equalsIgnoreCase("bungee=")) {
|
||||||
|
e.commandTagUsed();
|
||||||
|
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||||
|
try {
|
||||||
|
out.writeUTF(e.p.getName());
|
||||||
|
out.writeUTF(String.join(" ",e.args));
|
||||||
|
} catch(Exception ex) {
|
||||||
|
e.p.sendMessage(plugin.tag + ChatColor.translateAlternateColorCodes('&', "&cSomething wrong happened..."));
|
||||||
|
}
|
||||||
|
e.p.sendPluginMessage(plugin, "my:psb", out.toByteArray());
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(e.name.equalsIgnoreCase("msg=")) {
|
if(e.name.equalsIgnoreCase("msg=")) {
|
||||||
e.commandTagUsed();
|
e.commandTagUsed();
|
||||||
plugin.tex.sendString(e.panel,e.pos,e.p,String.join(" ",e.args));
|
plugin.tex.sendString(e.panel,e.pos,e.p,String.join(" ",e.args));
|
||||||
|
Loading…
Reference in New Issue
Block a user