commit
2723f962e1
6 changed files with 61 additions and 81 deletions
44
ButtonPresents.iml
Normal file
44
ButtonPresents.iml
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.5" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.16.2-R0.1-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:21.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.16-R0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.TBMCPlugins.ChromaCore:Chroma-Core:master-ab4dd75684-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:annotations:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.20.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mockito:mockito-core:3.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.TBMCPlugins.ChromaCore:ButtonProcessor:master-ab4dd75684-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.tbmcplugins:ButtonWebsiteModule:master-9d07c7bf2b-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.massivecraft:Factions:1.6.9.5-U0.5.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.massivecraft:Factions-Legacy:1.6.9.5-U0.5.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.papermc:paperlib:1.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: mkremins:fanciful:0.4.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.darkblade12:particleeffect:1.8.0-fuuid" level="project" />
|
||||
<orderEntry type="library" name="Maven: me.lucko:commodore:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mojang:brigadier:1.0.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.spongepowered:configurate-hocon:3.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.spongepowered:configurate-core:3.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.typesafe:config:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kitteh:paste-gg-api:0.9.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TownyAdvanced:Towny:0.96.2.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
|
||||
</component>
|
||||
</module>
|
18
pom.xml
18
pom.xml
|
@ -32,7 +32,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.0</version>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
|
@ -47,7 +47,7 @@
|
|||
</repository>
|
||||
<repository> <!-- This repo fixes issues with transitive dependencies -->
|
||||
<id>jcenter</id>
|
||||
<url>http://jcenter.bintray.com</url>
|
||||
<url>https://jcenter.bintray.com</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
|
@ -55,7 +55,11 @@
|
|||
</repository>
|
||||
<repository>
|
||||
<id>Factions</id>
|
||||
<url>http://ci.ender.zone/plugin/repository/everything/</url>
|
||||
<url>https://ci.ender.zone/plugin/repository/everything/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>TownyAdvanced</id>
|
||||
<url>https://github.com/TownyAdvanced/Towny/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
|
@ -67,8 +71,9 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.12.2-R0.1-SNAPSHOT</version>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.16.2-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.TBMCPlugins.ChromaCore</groupId>
|
||||
|
@ -86,8 +91,9 @@
|
|||
<version>1.6.9.5-U0.5.16</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.palmergames.bukkit.towny</groupId>
|
||||
<groupId>com.github.TownyAdvanced</groupId>
|
||||
<artifactId>Towny</artifactId>
|
||||
<!-- <version>8d3b6b6</version> ButtonCore repo -->
|
||||
<version>0.96.2.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package buttondevteam.presents;
|
||||
|
||||
import buttondevteam.lib.architecture.Component;
|
||||
import buttondevteam.presents.components.chunkarchive.ChunkArchiveComponent;
|
||||
import buttondevteam.presents.components.magic.MagicComponent;
|
||||
import buttondevteam.presents.components.portals.PortalLimitComponent;
|
||||
import buttondevteam.presents.components.research.ResearchComponent;
|
||||
|
@ -14,7 +13,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||
import java.util.logging.Logger;
|
||||
|
||||
public class ButtonPresents extends JavaPlugin{
|
||||
|
||||
//Hello Norbs
|
||||
public void onEnable(){
|
||||
PluginDescriptionFile pdfFile = getDescription();
|
||||
|
||||
|
@ -26,11 +25,6 @@ public class ButtonPresents extends JavaPlugin{
|
|||
Component.registerComponent(this, new SpawnComponent());
|
||||
Component.registerComponent(this, new MagicComponent());
|
||||
Component.registerComponent(this, new ResearchComponent());
|
||||
try {
|
||||
Component.registerComponent(this, new ChunkArchiveComponent());
|
||||
} catch (NoClassDefFoundError e) {
|
||||
getLogger().warning("ChunkArchive compatibility error, not registering it.");
|
||||
}
|
||||
Component.registerComponent(this, new TownyFactionsComponent());
|
||||
Component.registerComponent(this, new PortalLimitComponent());
|
||||
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
package buttondevteam.presents.components.chunkarchive;
|
||||
|
||||
import buttondevteam.lib.TBMCCoreAPI;
|
||||
import buttondevteam.lib.architecture.Component;
|
||||
import buttondevteam.lib.architecture.ComponentMetadata;
|
||||
import buttondevteam.presents.ButtonPresents;
|
||||
import net.minecraft.server.v1_12_R1.ChunkRegionLoader;
|
||||
import net.minecraft.server.v1_12_R1.ExceptionWorldConflict;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftChunk;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftWorld;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.world.ChunkPopulateEvent;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
// @formatter:off
|
||||
@ComponentMetadata(enabledByDefault = false)
|
||||
public class ChunkArchiveComponent extends Component<ButtonPresents> implements Listener {
|
||||
private final File dataFolder = new File("plugins", "ChunkArchive");
|
||||
@Override
|
||||
public void enable() {
|
||||
try {
|
||||
this.registerListener(this);
|
||||
File testFolder = new File(dataFolder, "test");
|
||||
testFolder.mkdirs();
|
||||
Logger logger = getPlugin().getLogger();
|
||||
logger.info("Starting chunk save test...");
|
||||
ChunkRegionLoader testcrl = new ChunkRegionLoader(testFolder,
|
||||
((CraftServer) Bukkit.getServer()).getServer().dataConverterManager);
|
||||
CraftWorld mainWorld=(CraftWorld) Bukkit.getWorlds().get(0);
|
||||
testcrl.saveChunk(mainWorld.getHandle(),
|
||||
((CraftChunk) mainWorld.getLoadedChunks()[0]).getHandle(), false);
|
||||
logger.info("Test complete");
|
||||
}
|
||||
catch(Exception e) {
|
||||
TBMCCoreAPI.SendException("ChunkArchive loading/testing failed!", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void disable() {
|
||||
|
||||
}
|
||||
/*------------------------------------------------------------*/
|
||||
|
||||
private final ChunkRegionLoader chunkRegionLoader =
|
||||
|
||||
new ChunkRegionLoader(dataFolder,
|
||||
((CraftServer) Bukkit.getServer()).getServer().dataConverterManager);
|
||||
|
||||
/*------------------------------------------------------------*/
|
||||
|
||||
@EventHandler
|
||||
public void onChunkPopulate(ChunkPopulateEvent event) throws IOException, ExceptionWorldConflict
|
||||
{
|
||||
if (event.getWorld().getName().equals("world"))
|
||||
chunkRegionLoader.saveChunk(((CraftWorld) event.getWorld()).getHandle(),
|
||||
((CraftChunk) event.getChunk()).getHandle(), false);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package buttondevteam.presents.components.research.dictionary.effects;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
|
@ -11,8 +12,8 @@ public class Bedsplode implements Listener {
|
|||
Player player = event.getPlayer();
|
||||
player.sendMessage("[ButtonPresents] Nighty night " + player.getName().toLowerCase());
|
||||
if (!player.getName().toLowerCase().equalsIgnoreCase("alisolarflare")) return;
|
||||
player.sendMessage("Your Bed's Material is: " + event.getBed().getBlockData().getMaterial().toString());
|
||||
|
||||
if (event.getBed().getType() == Material.BLUE_BED) return;
|
||||
|
||||
player.getWorld().createExplosion(
|
||||
player.getLocation().getBlockX(),
|
||||
player.getLocation().getBlockY(),
|
||||
|
|
|
@ -14,7 +14,7 @@ public class SetBlock extends UniversalCommand {
|
|||
public boolean def(Player player) {
|
||||
Block blockAtPlayer = player.getWorld().getBlockAt(player.getLocation());
|
||||
|
||||
blockAtPlayer.setType(Material.CAKE_BLOCK);
|
||||
blockAtPlayer.setType(Material.CAKE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue