Giter Site home page Giter Site logo

wonkers0 / dfspigot Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 4.0 3.37 MB

A tool for translating DiamondFire templates into Java Spigot Dependency Code.

Home Page: https://wonkers0.github.io/DFSpigot

License: MIT License

Java 100.00%
java diamondfire minecraft spigot spigotmc

dfspigot's Introduction

Tech Stack

Python Java Firebase JavaScript NodeJS Deno JS React SASS Vite Express.js C# CSS3 HTML5 Markdown Lua NPM Next JS Svelte TypeScript Bun

dfspigot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dfspigot's Issues

Vars used as repeating parameters may not be formatted correctly

02.08 11:19:20 [Server] ERROR Could not pass event PlayerInteractEvent to DFPlugin v1.0
02.08 11:19:20 [Server] INFO java.lang.NullPointerException: Cannot read the array length because "vals" is null
02.08 11:19:20 [Server] INFO at me.wonk2.utilities.DFUtilities.parseTxt(DFUtilities.java:119) ~[Spigotifier-0.1-SNAPSHOT-shaded.jar:?]
02.08 11:19:20 [Server] INFO at me.wonk2.utilities.values.DFValue.castTxt(DFValue.java:16) ~[Spigotifier-0.1-SNAPSHOT-shaded.jar:?]
02.08 11:19:20 [Server] INFO at me.wonk2.utilities.actions.PlayerAction.invokeAction(PlayerAction.java:59) ~[Spigotifier-0.1-SNAPSHOT-shaded.jar:?]
02.08 11:19:20 [Server] INFO at me.wonk2.DFPlugin.LeftClick(DFPlugin.java:33) ~[Spigotifier-0.1-SNAPSHOT-shaded.jar:?]
02.08 11:19:20 [Server] INFO at com.destroystokyo.paper.event.executor.asm.generated.Generate
02.08 11:19:20 [Server] INFO at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
02.08 11:19:20 [Server] INFO at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:git-Paper-"86f87ba"]
02.08 11:19:20 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
02.08 11:19:20 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:670) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
02.08 11:19:20 [Server] INFO at org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:544) ~[paper-1.19.jar:git-Paper-"86f87ba"]
02.08 11:19:20 [Server] INFO at org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:507) ~[paper-1.19.jar:git-Paper-"86f87ba"]
02.08 11:19:23 [Server] INFO at org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:502) ~[paper-1.19.jar:git-Paper-"86f87ba"]
02.08 11:19:23 [Server] INFO at org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:498) ~[paper-1.19.jar:git-Paper-"86f87ba"]
02.08 11:19:23 [Server] INFO at net.minecraft.server.network.ServerGamePacketListenerImpl.handleAnimate(ServerGamePacketListenerImpl.java:2535) ~[?:?]
02.08 11:19:23 [Server] INFO at net.minecraft.network.protocol.game.ServerboundSwingPacket.handle(ServerboundSwingPacket.java:25) ~[?:?]
02.08 11:19:23 [Server] INFO at net.minecraft.network.protocol.game.ServerboundSwingPacket.a(ServerboundSwingPacket.java:11) ~[?:?]
02.08 11:19:23 [Server] INFO at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
02.08 11:19:23 [Server] INFO at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.19.jar:git-Paper-"86f87ba"]
02.08 11:19:23 [Server] INFO at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
02.08 11:19:23 [Server] INFO at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
02.08 11:19:23 [Server] INFO at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1359) ~[paper-1.19.jar:git-Paper-"86f87ba"]
02.08 11:19:23 [Server] INFO at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:183) ~[paper-1.19.jar:git-Paper-"86f87ba"]
02.08 11:19:23 [Server] INFO at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
02.08 11:19:23 [Server] INFO at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1336) ~[paper-1.19.jar:git-Paper-"86f87ba"]
02.08 11:19:23 [Server] INFO at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1329) ~[paper-1.19.jar:git-Paper-"86f87ba"]
02.08 11:19:23 [Server] INFO at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
02.08 11:19:23 [Server] INFO at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1307) ~[paper-1.19.jar:git-Paper-"86f87ba"]
02.08 11:19:23 [Server] INFO at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1192) ~[paper-1.19.jar:git-Paper-"86f87ba"]
02.08 11:19:23 [Server] INFO at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:303) ~[paper-1.19.jar:git-Paper-"86f87ba"]
02.08 11:19:23 [Server] INFO at java.lang.Thread.run(Thread.java:831) ~[?:?]

Context: Var used in SendMessage

Full DFPlugin.java:

package me.wonk2;

import me.wonk2.utilities.*;
import me.wonk2.utilities.enums.*;
import me.wonk2.utilities.values.*;
import org.bukkit.boss.BossBar;
import org.bukkit.command.CommandSender;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.event.EventHandler;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.Bukkit;
import java.util.*;
import org.bukkit.event.player.PlayerInteractEvent;
import me.wonk2.utilities.actions.SetVariable;
import me.wonk2.utilities.actions.PlayerAction;

public class DFPlugin extends JavaPlugin implements Listener, CommandExecutor{
  public static HashMap<String, TreeMap<Integer, BossBar>> bossbarHandler = new HashMap<>();
  public static JavaPlugin plugin;
  
  @EventHandler
  public void LeftClick(PlayerInteractEvent event){
    HashMap<String, DFValue> localVars = new HashMap<>();
    SetVariable.invokeAction(ParamManager.formatParameters(new HashMap<>(){{
      put(0, new DFValue(new DFVar("" + event.getPlayer().getName() + " clicks", Scope.GLOBAL), 0, DFType.VAR));
    }},
    new HashMap<>(){}, "SETVAR:+=", localVars), "+=", new LivingEntity[]{event.getPlayer()}, localVars);

    PlayerAction.invokeAction(ParamManager.formatParameters(new HashMap<>(){{
      put(0, new DFValue(new DFVar("" + event.getPlayer().getName() + " clicks", Scope.GLOBAL), 0, DFType.VAR));
    }},
    new HashMap<>(){{
      put("Text Value Merging", "Add spaces");
      put("Alignment Mode", "Regular");
    }}, "PLAYERACTION:SendMessage", localVars), "SendMessage", new LivingEntity[]{event.getPlayer()});

  }
  
  @Override
  public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
    return true;
  }
  
  @Override
  public void onEnable(){
    plugin = this;
    
    DFUtilities.getManagers(this);
    getServer().getPluginManager().registerEvents(this, this);
    getServer().getPluginManager().registerEvents(new DFUtilities(), this);
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.