mirror of
https://github.com/BlazingGames/blazing-games-plugin.git
synced 2025-02-03 19:06:42 -05:00
update to 1.21.4
This commit is contained in:
parent
e82d500f2d
commit
13bc3952c5
13 changed files with 142 additions and 12 deletions
|
@ -19,7 +19,7 @@ jobs:
|
|||
- name: Setup Gradle
|
||||
uses: actions/gradle/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '8.11'
|
||||
gradle-version: '8.12'
|
||||
|
||||
- name: Build with Gradle
|
||||
run: gradle -Pversion=${{ github.run_number }} build
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
# User-specific stuff
|
||||
.idea/
|
||||
!.idea/fileTemplates/
|
||||
|
||||
*.iml
|
||||
*.ipr
|
||||
|
|
19
.idea/fileTemplates/internal/AnnotationType.java
Normal file
19
.idea/fileTemplates/internal/AnnotationType.java
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2025 The Blazing Games Maintainers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
|
||||
#parse("File Header.java")
|
||||
public @interface ${NAME} {
|
||||
}
|
19
.idea/fileTemplates/internal/Class.java
Normal file
19
.idea/fileTemplates/internal/Class.java
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2025 The Blazing Games Maintainers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
|
||||
#parse("File Header.java")
|
||||
public class ${NAME} {
|
||||
}
|
19
.idea/fileTemplates/internal/Enum.java
Normal file
19
.idea/fileTemplates/internal/Enum.java
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2025 The Blazing Games Maintainers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
|
||||
#parse("File Header.java")
|
||||
public enum ${NAME} {
|
||||
}
|
19
.idea/fileTemplates/internal/Interface.java
Normal file
19
.idea/fileTemplates/internal/Interface.java
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2025 The Blazing Games Maintainers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
|
||||
#parse("File Header.java")
|
||||
public interface ${NAME} {
|
||||
}
|
19
.idea/fileTemplates/internal/Record.java
Normal file
19
.idea/fileTemplates/internal/Record.java
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2025 The Blazing Games Maintainers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
|
||||
#parse("File Header.java")
|
||||
public record ${NAME}() {
|
||||
}
|
18
.idea/fileTemplates/internal/module-info.java
Normal file
18
.idea/fileTemplates/internal/module-info.java
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright 2025 The Blazing Games Maintainers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#parse("File Header.java")
|
||||
module #[[$MODULE_NAME$]]# {
|
||||
}
|
17
.idea/fileTemplates/internal/package-info.java
Normal file
17
.idea/fileTemplates/internal/package-info.java
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright 2025 The Blazing Games Maintainers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#parse("File Header.java")
|
||||
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
|
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id 'java'
|
||||
id("io.papermc.paperweight.userdev") version "1.7.1"
|
||||
id("io.papermc.paperweight.userdev") version "2.0.0-beta.14"
|
||||
}
|
||||
|
||||
group = 'de.blazemcworld'
|
||||
|
@ -21,8 +21,8 @@ repositories {
|
|||
dependencies {
|
||||
// IMPORTANT IF YOU"RE ADDING OR UPDATING DEPENDENCIES!!!!!!!!!
|
||||
// add them in plugin.yml too so that they are loaded when running on a server
|
||||
paperweight.paperDevBundle("1.21-R0.1-SNAPSHOT")
|
||||
compileOnly "io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT"
|
||||
paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
|
||||
compileOnly "io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT"
|
||||
|
||||
// ULID
|
||||
implementation 'io.azam.ulidj:ulidj:1.0.4'
|
||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
@ -48,15 +48,14 @@ import org.bukkit.util.Vector;
|
|||
import org.joml.Quaternionf;
|
||||
import org.joml.Vector3f;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
||||
public class BlockPlaceEventListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onBlockPlace(BlockPlaceEvent event) throws IOException {
|
||||
if (event.getItemInHand() != null && (CustomItems.SKELETON_KEY.matchItem(event.getItemInHand()) || CrateManager.getKeyULID(event.getItemInHand()) != null)) {
|
||||
public void onBlockPlace(BlockPlaceEvent event) {
|
||||
if (CustomItems.SKELETON_KEY.matchItem(event.getItemInHand()) || CrateManager.getKeyULID(event.getItemInHand()) != null) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
@ -175,7 +174,7 @@ public class BlockPlaceEventListener implements Listener {
|
|||
} else {
|
||||
event.getPlayer().getInventory().setItem(event.getHand(), new ItemStack(Material.AIR));
|
||||
}
|
||||
if ("".equals(computerId)) {
|
||||
if (computerId.isEmpty()) {
|
||||
ComputerRegistry.placeNewComputer(
|
||||
placeLocation,
|
||||
computerTypes,
|
||||
|
@ -241,7 +240,7 @@ public class BlockPlaceEventListener implements Listener {
|
|||
shulker.setSilent(true);
|
||||
shulker.getPersistentDataContainer().set(BlazingGames.get().key("slab_type"), PersistentDataType.STRING, slab);
|
||||
shulker.getPersistentDataContainer().set(BlazingGames.get().key("slab"), PersistentDataType.STRING, uuid.toString());
|
||||
Objects.requireNonNull(shulker.getAttribute(Attribute.GENERIC_SCALE)).setBaseValue(0.5);
|
||||
Objects.requireNonNull(shulker.getAttribute(Attribute.SCALE)).setBaseValue(0.5);
|
||||
|
||||
ArmorStand armorStand = (ArmorStand) loc.getWorld().spawnEntity(loc, EntityType.ARMOR_STAND);
|
||||
armorStand.setInvisible(true);
|
||||
|
@ -250,7 +249,7 @@ public class BlockPlaceEventListener implements Listener {
|
|||
armorStand.setMarker(true);
|
||||
armorStand.setGravity(false);
|
||||
armorStand.setSmall(true);
|
||||
Objects.requireNonNull(armorStand.getAttribute(Attribute.GENERIC_SCALE)).setBaseValue(0.00001);
|
||||
Objects.requireNonNull(armorStand.getAttribute(Attribute.SCALE)).setBaseValue(0.00001);
|
||||
armorStand.addPassenger(shulker);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: blazinggames
|
||||
version: '${version}'
|
||||
main: de.blazemcworld.blazinggames.BlazingGames
|
||||
api-version: '1.21'
|
||||
api-version: '1.21.4'
|
||||
prefix: BlazingGames
|
||||
authors: [BlazeMCworld, sbot50, 'Ivy Collective (ivyc.)', XTerPL]
|
||||
description: funny block game javascript computers
|
||||
|
|
Loading…
Reference in a new issue