mirror of
https://github.com/CarmJos/MoeTeleport.git
synced 2026-06-05 00:28:16 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7862a698bd | |||
| 351f9a8590 | |||
| ce3226ee18 |
@@ -0,0 +1,38 @@
|
|||||||
|
name: Release Version
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published # 创建release的时候触发
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: "Set up JDK"
|
||||||
|
uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
java-version: '11'
|
||||||
|
distribution: 'adopt'
|
||||||
|
# cache: maven
|
||||||
|
server-id: github
|
||||||
|
server-username: MAVEN_USERNAME
|
||||||
|
server-password: MAVEN_TOKEN
|
||||||
|
- name: "Package"
|
||||||
|
run: mvn -B package --file pom.xml -Dmaven.javadoc.skip=true -DskipTests
|
||||||
|
env:
|
||||||
|
MAVEN_USERNAME: ${{ github.repository_owner }}
|
||||||
|
MAVEN_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
|
||||||
|
- name: "Upload Release Asset"
|
||||||
|
id: upload-release-asset
|
||||||
|
uses: shogo82148/actions-upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
|
asset_path: asset/*.jar
|
||||||
|
asset_content_type: application/java-archive
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
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">
|
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>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
<maven.compiler.target>8</maven.compiler.target>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<groupId>cc.carm.plugin</groupId>
|
<groupId>cc.carm.plugin</groupId>
|
||||||
<artifactId>moeteleport</artifactId>
|
<artifactId>moeteleport</artifactId>
|
||||||
<version>1.0.5</version>
|
<version>1.1.1</version>
|
||||||
|
|
||||||
<name>MoeTeleport</name>
|
<name>MoeTeleport</name>
|
||||||
<description>喵喵传送,简单的传送、设置家的插件。</description>
|
<description>喵喵传送,简单的传送、设置家的插件。</description>
|
||||||
@@ -161,12 +161,12 @@
|
|||||||
<goals>
|
<goals>
|
||||||
<goal>shade</goal>
|
<goal>shade</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
|
||||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<finalName>${project.name}-${project.version}</finalName>
|
||||||
|
<outputDirectory>${project.basedir}/asset/</outputDirectory>
|
||||||
|
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||||
<filters>
|
<filters>
|
||||||
<filter>
|
<filter>
|
||||||
<artifact>*:*</artifact>
|
<artifact>*:*</artifact>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import cc.carm.plugin.moeteleport.configuration.values.ConfigValueMap;
|
|||||||
|
|
||||||
public class PluginConfig {
|
public class PluginConfig {
|
||||||
|
|
||||||
public static final ConfigValueMap<String, Integer> PERMISSIONS = new ConfigValueMap<>(
|
public static final ConfigValueMap<Integer, String> PERMISSIONS = new ConfigValueMap<>(
|
||||||
"permissions", s -> s, Integer.class
|
"permissions", Integer::parseInt, String.class
|
||||||
);
|
);
|
||||||
|
|
||||||
public static final ConfigValueList<String> DANGEROUS_TYPES = new ConfigValueList<>(
|
public static final ConfigValueList<String> DANGEROUS_TYPES = new ConfigValueList<>(
|
||||||
|
|||||||
@@ -41,16 +41,17 @@ public class UserManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxHome(Player player) {
|
public int getMaxHome(Player player) {
|
||||||
Map<String, Integer> permissions = PluginConfig.PERMISSIONS.get();
|
Map<Integer, String> permissions = PluginConfig.PERMISSIONS.get();
|
||||||
int value = PluginConfig.DEFAULT_HOME.get();
|
int current = PluginConfig.DEFAULT_HOME.get();
|
||||||
for (Map.Entry<String, Integer> entry : permissions.entrySet()) {
|
|
||||||
if (entry.getValue() > value && player.hasPermission(
|
for (Map.Entry<Integer, String> entry : permissions.entrySet()) {
|
||||||
Main.getInstance().getName() + "." + entry.getKey()
|
if (entry.getKey() > current && player.hasPermission(
|
||||||
|
Main.getInstance().getName() + "." + entry.getValue()
|
||||||
)) {
|
)) {
|
||||||
value = entry.getValue();
|
current = entry.getKey();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return value;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<UUID, UserData> getUserDataMap() {
|
public HashMap<UUID, UserData> getUserDataMap() {
|
||||||
|
|||||||
Reference in New Issue
Block a user