#help-archived

1 messages ยท Page 12 of 1

frigid ember
#

there a lot more

solemn grove
#

I read that long time ago..

frigid ember
#

that goes on

#

then just that

glacial plaza
#

security...

#

etc

wanton delta
#

so tldr

#

its impossible to do server side

solemn grove
#

it's ok

vagrant rune
#

Hosting at home probably not worth it unless you have top internet speeds
@glacial plaza yep, agree, that is the point.. coz I'm not sure my location is better for ping comparing with France-located hosting)

solemn grove
#

thing just came to the worst

#

ill use runnable to make it work

frigid ember
#

Hosting companies take care of most of the stuff

wanton delta
#

If the parrot is on a solid block you might be able to use packets to put the jukebox two blocks below it and play/pause the jukebox really quickly to start the animation. Pausing the jukebox might not work, though, so you could use a resource pack to make one of the discs silent and put the music file for it elsewhere. Then just listen for when a player actually uses the jukebox and play the music manually.

TL;DR wizardry and packet magic might work.

#

idk could try doing that

vagrant rune
#

Hosting companies take care of most of the stuff
@frigid ember yeah, but the price for me is too high, like for the pet-project. That's why I'm thinking about own server-pc

*the price for better hardware

solemn grove
#

the jukebox isn't the trigger condition

#

it's the world event packet

glacial plaza
#

Well, if you know how to properly set up your network in terms of security and other things then why not

vagrant rune
#

uh, life is full of challenges)

glacial plaza
#

ikr

vagrant rune
#

I just need your thoughts) Thanks guys!

Have a good day and let corona doesn't beat u)

wanton delta
#

i had a home server

#

didnt use it for anything public beyond hosting small servers for my friends

frigid ember
#

there going to be that one sad prick that just ruins your day

glacial plaza
#

it's backdoor time

vagrant rune
#

ohh yeah

raw arch
#

What's the plugins name that allows players to click on JSON messages from npcs? To execute a command

#

I swear there was one but I'm not sure what it's called

wanton delta
#

Citizens... maybe?

raw arch
#

I don't think citizens allows that

wanton delta
#

wdym json messages

frigid ember
#

CitizensCMD allows to send commands on right click

wanton delta
#

like chat messages that show up in chat?

frigid ember
#

it binds the cmd

wanton delta
#

i think he means

#

text in chat

frigid ember
#

which you could do a command in it

raw arch
#

Yeah

wanton delta
#

that has an executor command

frigid ember
#

like there a plugin

#

called MyCommands

#

where you can write up the command in there

#

with the text

#

then just bind it to the citizen using CitzensCMD

wanton delta
#

Idk if citizens supports it but if they support tellraw chat

raw arch
#

Like the npc sends a message and the player can hover over either like [yes] or [no] and click it to execute a command

wanton delta
#

right

#

look into citizens, they might allow tellraw messages

#

well actually

#

they do

#

citizensCMD

old barn
#
org.bukkit.plugin.InvalidPluginException: java.lang.IllegalArgumentException: Plugin already initialized!
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:331) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:254) [spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:293) [spigot.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:202) [spigot.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [spigot.jar:git-PaperSpigot-"4c7641d"]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Caused by: java.lang.IllegalArgumentException: Plugin already initialized!
at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:123) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at me.imhard.Main.<init>(Main.java:11) ~[?:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_242]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_242]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_242]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_242]
at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_242]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:77) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[spigot.jar:git-PaperSpigot-"4c7641d"]

Help me? '-'

wanton delta
#

then use tellraw

raw arch
#

Alright thanks

wanton delta
#

@old barn two plugins have the same name in plugin.yml

#

so you have either a duplicate

#

or something is going wrong

fleet burrow
#

Ummm

#

Does anyone know if worldedit removes the tile entities on a block

wanton delta
#

tile entities are blocks

fleet burrow
#

Yeah I know

#

but

wanton delta
#

do you mean the nbt data

#

stored in the block

fleet burrow
#

[20:59:21] [Server thread/INFO]: Attempted to place a tile entity (net.minecraft.server.v1_15_R1.TileEntityHopper@27f7af55) at -450,126,-568 (Block{minecraft:air}) where there was no entity tile! [20:59:21] [Server thread/INFO]: Chunk coordinates: -464,-576 [20:59:21] [Server thread/WARN]: java.lang.Exception [20:59:21] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.Chunk.setTileEntity(Chunk.java:456) [20:59:21] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.Chunk.a(Chunk.java:433)

wanton delta
#

oh dear

fleet burrow
#

After removing something I stored persistentdata on with worldedit

wanton delta
#

i have no clue what that means

frigid ember
#

neither do i

fleet burrow
#

I'll try resetting the world and seeing if it was something else

frigid ember
#

have you tried a server restart?

fleet burrow
#

That's what caused it lmao

frigid ember
#

it usually corrects things like that on its own

#

ok then

#

so did you restart

#

in the middle of an edit?

fleet burrow
#

no

frigid ember
#

that's usually where I have issues

#

when I stop it in the middle of a large edit

#

did you go to the chunk coordinates

old barn
#

@wanton delta There are no 2 plugins with the same name in plugin.yml

fleet burrow
#

When I set it to air this also happens ๐Ÿคทโ€โ™‚๏ธ
[21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:hopper @ BlockPosition{x=-105, y=102, z=-79} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:hopper @ BlockPosition{x=-106, y=102, z=-78} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:smoker @ BlockPosition{x=-105, y=101, z=-79} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:smoker @ BlockPosition{x=-106, y=101, z=-78} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:hopper @ BlockPosition{x=-106, y=102, z=-80} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:hopper @ BlockPosition{x=-107, y=102, z=-79} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:campfire @ BlockPosition{x=-106, y=103, z=-79} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:smoker @ BlockPosition{x=-106, y=101, z=-80} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:smoker @ BlockPosition{x=-107, y=101, z=-79}

#

I'll try resetting the world and seeing if it was something else
@fleet burrow fuck

old barn
#
org.bukkit.plugin.InvalidPluginException: java.lang.IllegalArgumentException: Plugin already initialized!
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:331) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:254) [spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:293) [spigot.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:202) [spigot.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [spigot.jar:git-PaperSpigot-"4c7641d"]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Caused by: java.lang.IllegalArgumentException: Plugin already initialized!
at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:123) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at me.imhard.Main.<init>(Main.java:11) ~[?:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_242]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_242]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_242]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_242]
at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_242]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:77) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[spigot.jar:git-PaperSpigot-"4c7641d"]

Help me? '-'

upbeat crest
#

hey, so basically i left a world that i didnt want to work with spigot use spigot and now my dimension files are in 3 different folders, is there any way to merge them back?

uneven gate
#

@old barn if two plugins are using the same package name, that could be an issue. For example, if you made a plugin and the package was main.hard.superplugin and you made another with main.hard.superplugin, that would be a problem. Package names need to be unique. That's why I always make my package names main.dartanman.pluginname. For example, my duels plugin is main.dartanman.duels and my EvilAdmin plugin is main.dartanman.eviladmin

frigid ember
#

he already got an answer and just ignored it

#

then came back again

#

give him 10 minutes, he'll do it again

limber moth
#

hi all, whats the best way to get the current version of a resource on spigot programmatically?

#

does anyone know does this still work?

hoary parcel
#

Yes it does

limber moth
#

does it work if its a zipped file with 2 jars in it?

hoary parcel
#

It doesn't work for your own downloads, just fyi

#

No

limber moth
#

oh so it has to be a pure jar file

hoary parcel
#

Why would you upload two jars?

limber moth
#

bungee / spigot version of plugin

hoary parcel
#

You can just do both in the same jar

#

And rename your bungee plugin.yml to bungee

limber moth
#

I heard of that, are there any examples of this?

hoary parcel
#

Or like, just upload two resources like normal ppl

#

Viaversion does it iirc

limber moth
#

like two seperate resources altogether?

tiny dagger
#

oh yeah bungee and bukkit works togheter

limber moth
#

no they dont

#

different API

tiny dagger
#

lol

#

it works

#

you put 2 paths

limber moth
#

oh so one for bukkit and one for bungee is it?

tiny dagger
#

one for bukkit javaplugin

#

and one for bungee

#

yeah

limber moth
#

hmm, interesting

tiny dagger
#

you can share resources between each other

subtle blade
#

Eh, yes and no

#

Bungee plugins should work exclusively on the bungee side. You can't, for instance, use a Player object on the Bungee side

tiny dagger
#

yeah

limber moth
#

yes thats what I meant

tiny dagger
#

but like a util class yes it can work

subtle blade
#

You can transfer necessary data through the plugin messaging channel afaik

limber moth
#

same with database class possibly

#

you have to have one player online for that to work

subtle blade
#

Stateless utilities that don't rely on either API will work on both, sure

#

If you import, say, Location into your util class, you can't use it on bungee

limber moth
#

yep

#

classnotfoundexception

subtle blade
limber moth
#

its an interesting principle then there is only one codebase

#

as I have two independant plugins one for bungee and one for spigot

#

they both share the same database related code

boreal tiger
subtle blade
#

No, that's the JIRA for plugin annotations. I'm suspicious that it's a bug though I'm not sure if it's as a result of Spigot so I'd hold off for now

boreal tiger
#

right

quick arch
#

why is there so much Essentials stuff Did not see it was for plugins ๐Ÿค”

subtle blade
#

I'll do some playing around later and see if it's necessary

boreal tiger
#

cool, thank you ๐Ÿ‘

thorny quartz
fleet burrow
#
@EventHandler(priority = EventPriority.HIGH)
    public void onPlayerInteract(PlayerInteractEvent e) {
        if (!e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return;
        if (!(e.getClickedBlock().getState() instanceof TileState)) return;

        if (machinery.getMachineManager().getMachinePartLocations().contains(e.getClickedBlock().getLocation())) {
            e.setUseInteractedBlock(Event.Result.DENY);
        }

        PlayerMachine machine = machinery.getMachineManager().getMachineCores().get(e.getClickedBlock().getLocation());
        if (machine != null) {
            e.setUseInteractedBlock(Event.Result.DENY);
            e.setCancelled(true);
            System.out.println(e.isCancelled());
            e.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&',
                    machinery.getFileManager().getConfig("config.yml").get().getString("open_machine_gui_message")));
            // TODO: Open gui machine management GUI logic
        }
    }

So I have this but for some reason when I right click the command block (machine core) it doesn't deny the interaction/cancel it but it does send the message

#

I am on 1.15

urban mortar
#

i need help i cant import my survival world into my minecraft server

#

i have a spawn but when i typ e/mv import Suvival(the name of the world) the mesage pop up failed?

#

the plugin is multiverse core

#

any1 can help me -ls?

gray trout
#

Try asking in the Multiverse Discord. Server rules don't allow me to link it.

sour dock
#

I'd say linking it is fine

#

right now the bot will probably delete your message because you aren't verified though

normal swift
#

hey guys im a little bit tired and i dont know what to do. ```java
public class ReloadTabCompletion implements TabCompleter {
@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
if(args.length == 1){
List<String> options = new ArrayList<>();
options.add("reload");
options.add("generateNewConfigFile");
for(String s : options){
if(!s.toLowerCase().startsWith(args[0].toLowerCase())){
options.remove(s);
}
}
return options;
}
return null;
}
}

this returnes me error everytime when i trying to type reload
vast dome
#

Nobody is answering my messages in spigot.com... the developer of bannerboard never answered and spigot help center neither... I want my regund back! ... Who can attend me from spigot employers?

tiny dagger
#

spigot doesn't actually handles the money

#

๐Ÿค”

vast dome
#

๐Ÿคฌ

tiny dagger
#

the only way is to solve this with the developer

solemn grove
#

how to make sure packets are send in a correct order?

vast dome
#

But he dont answer

limber moth
#

@vast dome If he does not answer, get in contact directly with paypal

#

he will be forced to answer there

tiny dagger
#

then file a dispute in paypal

limber moth
#

exactly

tiny dagger
#

don't do a charge back tho, don't be that guy

urban mortar
#

any1 can help me -ls?
@everyone

frigid ember
#

yo can you run spigot/bukkit on latest snapshot?

#

is it possible?

final verge
#

No

frigid ember
#

damn

limber moth
#

nope

final verge
#

but there is no public release of a 1.16 snapshot for spigot

limber moth
#

only as far as 1.15.2

final verge
#

Likely wont have anything until maybe a prerelease

frigid ember
#

you guys know when the snapshots going offcial?

#

i havent played mc in along ass time how long does it usually take em these days?

limber moth
#

going official from who

#

spigot or mojang

frigid ember
#

like when next update out

#

mojang

limber moth
#

no idea

keen moth
#

they're gotten "faster" because of their team's expansion

#

although not always preferred since fast can also mean rushed features ;P

limber moth
#

team size doesn't really matter, as long as there testing and competency is good, I think thats more important

#

you could have a huge dev team, but shit testing

#

and the end result is poop. You could also have a small team, extensive testing and community testing and boom you should have something quite stable from release

#

I wonder do mojang do community or beta testers

#

or are they still keeping it all in house

final verge
#

We get snapshots usually on a weekly basis from what they've been doing recently. But they have been pumping tons of new content into snapshots so it is hard to tell when they will move to pre-releases. Likely when we start seeing mostly bug fixes snapshots, that will be a sign of getting close

#

Then it usually is 2-5 weeks after that for an actual release

limber moth
#

ahh I see

tiny dagger
#

i wish mojang just took more time fixing and improving the game instead of throwing new stuff on top of the old one

limber moth
#

if they stop adding new stuff, people will get bored of it?

final verge
#

I mean they have been

tiny dagger
#

people aren't even playing it

limber moth
#

I guess better playability is better than shiny new features, I think so anyway

tiny dagger
#

so many of my buyers keep telling me 'support 1.8.8, the performance is so much better meee'

final verge
#

As I stated earlier somewhere, they have been rewriting a lot of notchian code. Lighting for example was done all over the place and they moved it into a centralized area to help maintain it better

limber moth
#

ahh

final verge
#

But if you look at statistics, a vast majority of servers are on newer versions

limber moth
#

thats true

tiny dagger
#

also i wanna see the stats on how many of those bought a dedicated server to host it

limber moth
#

56.4% are

#

those that use essentials that is

quick arch
#

82,354 servers (53.1%) are on 1.15.2

fleet burrow
#
@EventHandler(priority = EventPriority.HIGH)
    public void onPlayerInteract(PlayerInteractEvent e) {
        if (!e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return;
        if (!(e.getClickedBlock().getState() instanceof TileState)) return;

        if (machinery.getMachineManager().getMachinePartLocations().contains(e.getClickedBlock().getLocation())) {
            e.setUseInteractedBlock(Event.Result.DENY);
        }

        PlayerMachine machine = machinery.getMachineManager().getMachineCores().get(e.getClickedBlock().getLocation());
        if (machine != null) {
            e.setUseInteractedBlock(Event.Result.DENY);
            e.setCancelled(true);
            System.out.println(e.isCancelled());
            e.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&',
                    machinery.getFileManager().getConfig("config.yml").get().getString("open_machine_gui_message")));
            // TODO: Open gui machine management GUI logic
        }
    }

So I have this but for some reason when I right click the command block (machine core) it doesn't deny the interaction/cancel it but it does send the message
@fleet burrow Anyone? ๐Ÿ˜ฌ

normal swift
#

Nevermind i fixed it

solid ferry
#

@fleet burrow ||first, would be better to use getBlockLocation() instead of getLocation() in your if statement ๐Ÿ™‚||

#

Then, let me analyze your code 1 more minute

#

So, yeah, in your getMachinePartLocations() you have to be sure that you return a list of block locations

fleet burrow
#

It sends the message

#

e.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&', machinery.getFileManager().getConfig("config.yml").get().getString("open_machine_gui_message")));

#

This executes

solid ferry
#

What do you mean exactly by "it doesn't deny the interaction"

fleet burrow
#

Well, the command block gui still opens

solid ferry
#

Which interaction shouldn't happened

#

Okay

fleet burrow
#

Sorry, I didn't give much details

#

I gave lots here

quick arch
#

Your in 1.9+?

solid ferry
#

He's in 1.15

quick arch
#

there are 2 hands in the interact event, one is probably still working while the other isn't

fleet burrow
#

There is no logic involving hands though

solid ferry
#

So, do you think that the interact event doesn't prevent GUIs from being opened ?

fleet burrow
#

Well, the GUI is still opening

wanton delta
#

buildtools is telling me fatal: '<some folder here>' does not appear to be a git repository fatal: Could not read from remote repository. when <some folder here> doesnt even exist???

keen moth
#

heknon, i don't think it's a problem with your code. might be a bug, since same thing happened to me when i tried something similar to what you're doing but for a structure block. i just ended up closing the inventory on interaction

quick arch
#

๐Ÿค”

empty canopy
#

Where can I see the message I received in #verification ? I don't know where to look on the SpigotMC website.

fleet burrow
#

Alright, thanks ๐Ÿ™‚

quick arch
#

It should be in conversations

gusty crane
#

has anyone set up tebex integration towards bungeecord and know how to issue commands towards single minecraft server/lobby?

empty canopy
#

@quick arch I'm not getting anything. How long does it usually take?

manic raptor
#

If I send a packet to a player, should that almost always be run on a different thread?

quick arch
#

Did @tawdry lily reply with A private message has been sent to your SpigotMC.org account for verification! after you executed the command

#

if not, possibly try again

empty canopy
#

Yes

quick arch
#

CafeBabe's probably just being slow

wanton delta
#

can anyone help me with buildtools lol

empty canopy
#

@wanton delta I have a completely automated batch file to download/update it on Windows. I can send it to you if you want.

wanton delta
#

i dont think that will fix my problem

empty canopy
#

Oh, I didn't see your earlier post

crystal trench
#

Hello plugin creators ๐Ÿ˜„ Need a bit of help. I am creating multiblock structure that player can build himself. What I did is I made structure that contains Block data and relative position of center block that is assigned on creation (center block has position of 0,0,0). So now I want efficiently on block place event if player built structure similar to saved structure. What I have now is and that is not efficient (checking 1 structure with 42k block takes like 20 seconds):

if(e.isCancelled())
return;
                
for(String name : plugin.getMechanicalStructureRegister().getRegisterNames()) {
  Structure st = Main.getInstance().getStructures().getStructure(name);
  if(st == null) {
    continue;
  }
  for(Position pos : st.getBlocks().keySet()) {
    if(st.getBlocks().get(pos).similar(e.getBlock().getTypeId(), e.getBlock().getData())) {
      Location l = e.getBlock().getLocation().clone();
      Rotation rotation = Utils.getStructureRotation(st, l, pos);
      if(rotation != null) {
        boolean skip = false;
        for(MechanicalStructure mfs : Main.getInstance().getStructureThread().getAllStructures()) {
          if(mfs.getLoc().equals(l) && !mfs.isDestroyed()) {
            skip = true;
          }
        }
        if(skip)
          break;
        plugin.getServer().getPluginManager().callEvent(new StructurePlaceEvent(st, l, rotation, e.getPlayer()));
        break;
      }
    }
  }
}
empty canopy
#

So basically you're checking if the player-built structure is the same as the pre-built structure?

crystal trench
#

Yeah kinda

#

Pre-built structure is saved in ram

tiny dagger
solemn grove
#
player.playEffect(location, Effect.RECORD_PLAY, DiscContainer.BASEDISC_MATERIAL);
new BukkitRunnable(){
  @Override
  public void run() {
    player.stopSound(DiscContainer.BASEDISC_SOUND, SoundCategory.RECORDS);
  }
}.runTaskLater(plugin, 1);

Can I safely assume that player.stopSound will always fire after player.playEffect?

wanton delta
#

can i use --compile NONE in buildtools if i want it add it to my local maven repo

empty canopy
frigid ember
#

anyone know how to use bossshop api im trying to make an itemall item

BSBuy buy = bs.getAPI().createBSBuy("Test", BSRewardType.Money, BSPriceType.ItemAll, 100, "type:COOKED_CHICKEN", null, 5, null);
         
        //Get a Shop
        BSShop shop = bs.getAPI().getShop("Shop");

        //Add it to the Shop
        ItemStack item = new ItemStack(Material.COOKED_CHICKEN);
        bs.getAPI().addItemToShop(item, buy, shop);```
crystal trench
#

@empty canopy It won't help ๐Ÿ˜ฆ

foggy cargo
#

Does someone know whether it is within the possibilities of MC that you can create a java application outside MC linked to your plugin, or if it is possible to recreate the screen used for advancements, but make it so that you can call it at a command for example and show it with your own 'advancements'?

lavish hornet
#

is it possible to set an armorstand's helmet to a non equipable item? in 1.8

vagrant rune
#

Hello again!

I'd like to ask server-owners, what view-distance do you set in your server.properties?

proper bison
#

i leave mine too default

sudden compass
#

Hello good, I read some posts that said that you could connect two different servers using bungeecord. Is this possible?

Kind:

host 1 -> bungeecord -> prelobby -> lobby ->
host 2 -> bungeecord -> spigot server

Or the other thing I ask if it is possible is the following:

Host -> bungeecord 1 -> prelobby -> lobby
Host -> bungeecord 2 -> spigot server
(They are the same hosts but with different bungeecord. Is this possible?)
Is there an answer to my question?

vapid kindle
#

my server is currently on 8

haughty vector
#

Hello there, do you know if WorldEdit API is usable during the Populate event of world generation ? Because I've tried and it gets me an unreadable error and I'm afraid it's unusable in this context

icy dragon
limber marlin
#

Anyone know of a join/leave message plugin that works with SuperVanish?

frigid ember
#

@foggy cargo yea you can make a java application outside of mc

#

java is still java

#

i once made a discord bot that runs inside of a plugin

foggy cargo
#

how could you call it at a command?

dire wadi
sour dock
#

Aren't you talking about displaying something at the client's end?

#

You can't do that

celest garden
#

Hello, anyone knows PreciousStones plugin?

magic heart
#

can i create a server here? on the official page?

frigid ember
#

@celest garden do you have a specific question?? dont ask to ask, just ask your question and someone will reply. you don't need a subject matter expert. that's a great way to guarantee you never get a reply

celest garden
#

"Changes to work with WG7 and MC 1.15"

#

But i can't find it

#

i only find "Latest WG"

#

but it isn't working on 1.15

celest garden
#

Yes

#

but it working with redprotect

#

not with worldguard

frigid ember
#

Then you need to reach out to Nathan

#

He's the one making it compatible

celest garden
#

ok

frigid ember
#

good luck

celest garden
#

thanks

frigid ember
#

Oh, he said he's not maintaining it anymore

magic heart
#

can i create a server here? on the official page?

frigid ember
#

What do you mean "official page"

sour dock
#

spigotmc is not a server hosting company or server list

celest garden
#

yeah but it was in september 2019

#

and he is still updating it on jenkins

frigid ember
#

ok, well

celest garden
#

so i try to contact with him

frigid ember
#

reach out, see if you get some good luck

wind dock
#

Hey guys, so running a server on my own hardware and for some reason half my friends can and half cant join??? Any suggestions on what to do??

twin nexus
#

Does anyone know of any plugin to see life on the tab?

magic heart
#

I want to create a 24/7 minecraft server, can I create it?

frigid ember
#

Yes...but not here. We are not a hosting company.

#

We are the server software.

twin nexus
#

Does anyone know of any plugin to see life on the tab?

wind dock
#

Uhm anyone got any suggestions? Cant seem to work it out

twin nexus
#

Does anyone know of any plugin to see life on the tab?

arctic cloud
#

the other half may be mentally retarded

#

you should probably ask them for the error they get tho and check if you have any errors in the console

wanton delta
#

is there a way to circumvent api-version because my plugin has multiple version support... but idk how to handle that field

magic heart
#

Yes...but not here. We are not a hosting company.
@frigid ember but where can I create one 24/7?

arctic cloud
#

like any site that pops up on google for minecraft hosting

foggy cargo
#

Aren't you talking about displaying something at the client's end?
@sour dock
Yes I am, I want to create a GUI that is different than an inventory but I think that is not within the possibilities ๐Ÿ˜ฆ

frigid ember
sour dock
#

No, you can't run arbitrary code on the client

#

That would be bad

frigid ember
#

well...

#

people do that with custom res packs

wind dock
#

Hey guys, so running a minecraft server on my own hardware and for some reason half my friends can and half cant join??? Any suggestions on what to do??

ashen stirrup
#

How do you set a spawner (itemStack) type? (without NMS preferably)

subtle blade
#

is there a way to circumvent api-version because my plugin has multiple version support... but idk how to handle that field
Acts as a minimum version but is ignored on versions 1.12.2 and below because the server was unaware of it

#

Though you should be writing for more modern versions

ashen stirrup
#

Cheers

#

That's for placed blocks isn't it?

subtle blade
#

It's for ItemStacks

ashen stirrup
#

Really?

subtle blade
#

Yes

ashen stirrup
#
ItemStack spawner = new ItemStack(Material.SPAWNER);
ItemMeta spawnerMeta = (BlockStateMeta) spawner.getItemMeta();
#

or

BlockStateMeta spawnerMeta = spawner.getItemMeta();
subtle blade
#

Well the cast is useless in the first one, is it not? ;P

#

BlockStateMeta spawnerMeta = (BlockStateMeta) spawner.getItemMeta();

ashen stirrup
#

Ah yeah

subtle blade
#

You can get the block state using BlockStateMeta#getBlockState(), cast it to a CreatureSpawner, modify it how you want and re-set it with BlockStateMeta#setBlockState() again

ashen stirrup
#

Cheers ๐Ÿ™‚

naive goblet
#

Mhm so I have like the lapiz medal award and I can't change name :/ do you need to have the redstone one to have access for a name change or what?

neat oxide
#

yes

#

i believe

naive goblet
#

frick

#

how do I get that one then?

#

@subtle blade do I need the redstone award particular for a name change?

subtle blade
#

Just any donation above the minimum grants you that ability

naive goblet
#

I donated $20

#

for some reason instead of $10

subtle blade
#

md processes donations manually though so if you've not yet gotten it then be patient. Also, if you've donated with an email not associated with your spigot account, create a thread in the Donation Enquiries forum

naive goblet
#

Yes but I mean

#

Do I need the redstone one for a name change or can lapiz give you the same access as well?

#

Because rn it doesn't seem like I can

fleet crane
naive goblet
#

No Permission

#

ffs I shouldn't had donated $20

fleet crane
#

I mightโ€™ve made a mistake adding your rank then

naive goblet
#

aww man

#

Well

#

Idk

fleet crane
#

Iโ€™ve fixed it, give it up to and hour

naive goblet
#

ok thanks โค๏ธ

gusty crane
#

Hey im just wondering

#

how come i get an error on this?

naive goblet
#

send in bin

gusty crane
#

2 sec

fleet crane
#

Did you add bukkit as a depend

gusty crane
naive goblet
#

You dont seem to have the dependency added

#

Uhm can you browse to your dependencies?

gusty crane
#

where do i find it

#

new to eclipse

gusty crane
#

oh right

#

i forgot to fix the buildpath thing

#

big brain

#

thx for the help!

#

it works now

naive goblet
#

:]

frigid ember
#

?donate

naive goblet
#

Send entire CubeyMc pls

sharp trout
#

Is there a method to get the exact point that the user is looking at on a block? All the ones I can find only allow you to get the block itself

naive goblet
#

Hm

#

Maybe with armor stands

neat oxide
#

You mean on the block itself

#

nah troxx that would lag way too much

naive goblet
#

I mean getting the exact point

#

Canโ€™t see any other solutions for that

sharp trout
#

Like, if I were to place your crosshairs dead center on the top of the block it'd be 0.5x 0.5z

frigid ember
#

Hey guys, what would be a good price for an animated spotlights plugin?

neat oxide
#

Spigot doesnt transmit coords that fine i believe we mostly use doubles for coords

naive goblet
#

doubles can be kinda precised

neat oxide
#

not that precise

stark thistle
#

@naive goblet that method was where the error said it was happening in

naive goblet
#

Send entire class still

neat oxide
#

@sharp trout Whats the use case?

sharp trout
#

I can do it with trigonometry using the pitch and yaw, but I just wanted to know if there was already a method for that

neat oxide
#

nope

#

but do share the formula

naive goblet
#

@frigid ember depends on quality and features

neat oxide
#

i can maybe get it to work with native

#

props not tbh

stark thistle
#

nvm issue resolved, thanks anyway ๐Ÿ™‚

naive goblet
#

(:

wanton delta
#

forgot how for loops worked after using foreach loops for so long ๐Ÿ˜…

naive goblet
#

Weow

frigid ember
#

is there antixray for 1.8.8 ?

#

and is it needed for factions server

neat oxide
#

@vestal pebble Here go here to make your request for a developer

neat oxide
#

Anyone from the development team know how i can hook up my intellji debugger into spigot server jar id hate to put a bunch of println's everywhere for debugging

subtle blade
#

What's wrong with orebfuscator?

wanton delta
#

@neat oxide

#

I have the perfect solution for you!

#

my friend

neat oxide
#

Tell me i need it because i got some low level debugging to do

wanton delta
#

I made a resource on this a couple of years ago

#

nobody notices lol

neat oxide
#

I mean the actually spigot code not plugin

#

btw

wanton delta
#

...spigot code? huh?

neat oxide
#

yeah you know craftbukkit

wanton delta
#

yea what about it

neat oxide
#

im trying to debug spigot atm

wanton delta
#

oh

#

this should still apply

neat oxide
#

Send it

wanton delta
#

if you need any help with it feel free to dm or @ me

neat oxide
#

Sure

frigid ember
#

If I'm using custom annotations, is it ok to have enums?

public abstract class PEnchantment {
    
    private Trigger trigger;
    private EnchantmentInfo info = getClass().getAnnotation(EnchantmentInfo.class);
    private final String name;
    private final String desc;
    
    protected PEnchantment() {
    this.name = info.name();
    this.desc = info.desc();
    this.trigger = info.trigger();
    }
    
    public abstract void onTrigger(Player p);
    
    public abstract Trigger getTrigger();

}

where trigger would be an enum

public @interface EnchantmentInfo {

    String name();

    String desc();

    Trigger trigger();
    
}
@EnchantmentInfo(name="&cHealing", desc="Heal x level hearts every second!", trigger=Trigger.EQUIP)
public class.... {
neat oxide
#

Ask the java specs

#

not me

#

But if your IDE isnt crying i think your fine

frigid ember
#

I just want to make sure its good practice, because my IDE doesn't cry when I'm using static abuse

neat oxide
#

I dont know there is not really a specs for it i think

analog roost
#

Hello, i'm trying to build m'y project with gradle

#

To add dependency

#

But m'y build.gradle wont build ๐Ÿ˜ฆ

frigid ember
#

how do i give myself a mending book with /give command

#

someone plz help

subtle blade
#

/give @p enchanted_book{StoredEnchantments:[{id:"minecraft:mending",lvl:1}]}

raw nacelle
#

unrelated, mojang did an oopsie in a recent snapshot and made piglins give soul speed books with {Enchantments:...} instead of {StoredEnchantments:...} so they couldn't be used in anvils

subtle blade
#

ez

dusky herald
#

Anyone know why I'm getting this message?

#

I have the jar being exported and it's in my plugin's jar file

subtle blade
#

If you reloaded, that's a common issue

#

org.bukkit.craftbukkit.v1_15_R1.CraftServer.reload

#

mother fucker

#

lol

#

๐Ÿ‘ don't ๐Ÿ‘ use ๐Ÿ‘ the ๐Ÿ‘ reload ๐Ÿ‘ command ๐Ÿ‘

dusky herald
#

I restarted the server.

#

Still having the problem.

#

@subtle blade

drowsy hinge
#

@frigid ember enums in annotations are perfectly fine, definitely recommend in place of something like a string for constant values ๐Ÿ‘

subtle blade
#

/stop
Delete plugin
Export & put in plugins folder
Start server

#

More often than not, if you're in a testing environment, you're fine to use reload. Though occasionally if you're adding new classes you may run into issues such as this while replacing your plugin on a running server

dusky herald
#

Yeah, I use reload a lot typically because it is a testing environemnt

#

but either way, I just did what you suggested and it still isnt working.

#

Lmao

subtle blade
#

Well stop writing broken code PES_HyperReee

dusky herald
#

Nah, the code is fine lmao

#

It just isnt finding the damn class tf

vapid kindle
#

the error says it's not finding a class... did you not include the class or is a dependency not installed?

dusky herald
#

It is included, and I literally have the library JAR contained within my plugin's JAR

vapid kindle
#

the class path didn't change?

dusky herald
#

No? I use the original paths

#

It doesn't change as far as I know

vapid kindle
#

are you using Maven?

dusky herald
#

No

#

I dont even know how to use Maven, I cant even find it

harsh anvil
#

So i have an abstract class that implements Listener do i need to register all the child classes?

#

or is there a way to register all subclasses?

#

if that even makes sense

vapid kindle
#

you need to register all instances of Listener you create

harsh anvil
#

well thats a pain

vapid kindle
#

you can make it register itself in the constructor ยฏ_(ใƒ„)_/ยฏ

harsh anvil
#

that seems like an odd way to do it

#

or well actually

gentle kelp
#

How can i patch holograms moving from their position when using different versions, tried with hologram-patch confim in viaversion but it just worked with 1.9

subtle blade
#

you can make it register itself in the constructor ยฏ_(ใƒ„)_/ยฏ
Please don't :((

vapid kindle
#

why not?

harsh anvil
#

abstraction ig

subtle blade
#

You shouldn't have registration functionality in a constructor

harsh anvil
#

ctrl+d for the win

vapid kindle
#

that's the what, but I don't really understand the reasoning

harsh anvil
#

constructors are meant to intialize the object, not to execute logic

subtle blade
#

Not necessarily. Sometimes it's needed

#

Though your code should abide by a single-purpose principle. It would be the equivalent of having your getFoo() method print a message every time it's called

#
public String toString() {
    System.out.println("Returning: " + myString);
    return myString;
}```
#

Any developer trying to call and access that may not want that message to be printed. That's not the purpose of the method

frigid ember
#

Is this acceptable use of static? Where I have the main class as private static

public final class Util {

    private Util() {}
    
    private static final PvPMain main = PvPMain.getPlugin(PvPMain.class);
    
    public static String color(String s) {
    return ChatColor.translateAlternateColorCodes('&', s);
    }
    
    public static int calculateLevel(List<String> lore) {
    ...
    }
}
quick arch
#

๐Ÿค”

ashen stirrup
#

How would you check the meta of a spawner before it's placed?

dusky herald
#

You should just pass the instance of your plugin over to your classes that need it @frigid ember

#

MyClass(MyPlugin myPlugin)

frigid ember
#

I can do that for a utility class?

harsh anvil
#

@ashen stirrup get the itemstack and get the metadata

#

i think its returned in the blockplacevent?

subtle blade
#

It depends on what the utility is doing. Generally utils should avoid being stated

vapid kindle
#

well yeah, avoiding unexpected side effects, but I don't see why registering a Listener would be a side-effect when for example constructing a self-contained unit, e.g. a Listener/ticking object that only cares for events that affect specified game objects.

subtle blade
#

Well you also have the additional side effect of throwing away your instance. An empty object construction, so to speak. new MyListener() sitting randomly in a method

ashen stirrup
#

Only event.getItemInHand() returns an ItemStack

subtle blade
#

ItemStack has getMeta()

#

getItemMeta(). I don't remember

#

lol

ashen stirrup
#

So if I check their itemInHand on the place event it won't return null?

subtle blade
#

It shouldn't be null but I wouldn't assume that. Listeners may change it

#

Null check first

ashen stirrup
#

Yeah

vapid kindle
#

well, I'm obviously not just creating an instance without storing it somewhereโ€”that would actually be foolish if I ever wanted to destroy it

subtle blade
#

But a large majority of the time, you're not assigning a listener to anything

#

You see the predicament here? lol

vapid kindle
#

well, in that case you shouldn't let the Listener self-register ;D

subtle blade
#

You can do it in the constructor though I'll always advise against it

vapid kindle
#

getItemMeta is nullable, so a null check is mandatory

frigid ember
#

is anyone here proficient with worldedit?

sand helm
#

Me

ashen stirrup
#

So in theory, if the spawner's name is Creeper Spawner

        String[] nameCut = displayname.split(" ");
        EntityType spawnerType = EntityType.valueOf(nameCut[0]);

Would return a Creeper EntityType?

solar prism
#

yes

ashen stirrup
#

Perfect

solar prism
#

not sure if the string has to be all caps tho

ashen stirrup
#

I'll make it upper

#

OrienTobi

subtle blade
#

It does. It's case sensitive. Though valueOf() will throw an exception if not present. I'm always in favour of Enums.getIfPresent() from Guava

frigid ember
#

@sand helm so i have a world i downloaded is it possible to replace every ore with stone then have a random generation of stone be x ore

subtle blade
#

Shaded into Bukkit, shouldn't need any additional dependencies. Returns an Optional<T>

frigid ember
#

my map is 4000 x 10000 btw

solar prism
#

lmao big loops

#

does anyone know how to send a plugin message from one spigot server to another?

ashen stirrup
#

Enums.getIfPresent(EntityType.class, nameCut[0].toUpperCase());
Assuming that's how you use it correctly.

subtle blade
#

Not 100% sure if you need to upper case it. Let me check

solar prism
#

@subtle blade is your username inspired by the package manager

ashen stirrup
#

Oh, so you can just do this
EntityType spawnerType = Enums.getIfPresent(EntityType.class, nameCut[0].toUpperCase()).or(EntityType.PIG);

solar prism
#

or do you just like chocolate

subtle blade
#

It's case sensitive, but yes that's about how you'd use it, Jeeb

#

Nah, unrelated Plochem lol

ashen stirrup
#

Learn something new everyday ๐Ÿ˜…

solar prism
#

lmao ok

subtle blade
#

Better than throwing an exception from valueOf(), that's for sure :D

ashen stirrup
#

I can imagine Enums.getIfPresent().or(); being very useful

#

Assuming it returns whatever is passed in .or() if it isn't present.

dark shuttle
#

I wonder what is PacketPlayOutWindowItems used for

sand helm
ashen stirrup
#

Are you registering your listener?

sand helm
#

yes

#

public void registerEvents(){

    PluginManager pm = Bukkit.getServer().getPluginManager();
    pm.registerEvents(new PvpToggleCommand(), this);
    pm.registerEvents(new Freeze(), this);

}
subtle blade
#

That's the case, yea. or() will be called if the Optional returned by getIfPresent() is empty

ashen stirrup
#

Perfect

subtle blade
#

Kind of like Map#getOrDefault(key, defaultValue)

sand helm
#

@ashen stirrup

subtle blade
#

What all isn't working?

ashen stirrup
#

Any error message?

sand helm
#

no errors

#

pvp is just always enabled if it is "disabled"

subtle blade
#

$10 says you've created two instances of PvpToggleCommand, one for the command, one for the listener

sand helm
#
   public void registerCommands(){

        getCommand("pvp").setExecutor(new PvpToggleCommand());
        getCommand("sc").setExecutor(new StaffChat());
        getCommand("gmc").setExecutor(new Gmc());
        getCommand("heal").setExecutor(new Heal());
        getCommand("feed").setExecutor(new Feed());
        getCommand("gms").setExecutor(new Gms());
        getCommand("gma").setExecutor(new Gma());
        getCommand("gmsp").setExecutor(new Gmsp());
        getCommand("ac").setExecutor(new AdminChat());
        getCommand("clearchat").setExecutor(new ClearChat());
        getCommand("discord").setExecutor(new Discord());
        getCommand("teamspeak").setExecutor(new TeamSpeak());
        getCommand("Store").setExecutor(new Store());
        getCommand("twitter").setExecutor(new Twitter());
        getCommand("freeze").setExecutor(new Freeze());
    }

    public void registerEvents(){

        PluginManager pm = Bukkit.getServer().getPluginManager();
        pm.registerEvents(new PvpToggleCommand(), this);
        pm.registerEvents(new Freeze(), this);

    }

subtle blade
#

Have to remember that when you create an instance of something, its members are independent to that instance

ashen stirrup
#

$10 to you sir

subtle blade
#

Yep

#

Two options:
(1) Move the boolean value outside of your command/listener class. Whether that be the main class or whatever. Access it from there instead
(2) Create one instance of PvpToggleCommand (assign it to a variable) and register that same instance as an executor and listener

#

The first is preferred. Keeps your code organized and maintains a single-responsibility principle

sand helm
#

you mean private PvpToggleCommand = new pvptoggleconnand();

vapid kindle
#

(3) let the Command/Listener self-register :> (don't)

subtle blade
sand helm
#

self reguster?

#

*register

vapid kindle
#

forget I said anything, it's a meta reference

harsh anvil
#

whats the difference between registerEvent and registerEvents?

sand helm
#

@subtle blade thanks so much โค๏ธ

subtle blade
#

registerEvent was the old system (before Listener and @EventHandler)

#

Well, I suppose Listener existed, but EventHandler did not. You can still use it for smaller event calls

#

In fact, I used it as an example in a bug report not long ago

harsh anvil
#

okay

#

also, if i have a map of Parent is it possible to register all of them by looping over them?

#

i cant seem to get it to work

subtle blade
#
    @Override
    public void onEnable() {
        Bukkit.getPluginManager().registerEvent(BlockPlaceEvent.class, new Listener() {}, EventPriority.NORMAL, (listener, event) -> ((Cancellable) event).setCancelled(true), this);
    }```
harsh anvil
#

probably because it registers the parent type instead

#

Does PlayerEvent not trigger @EventListner?

vapid kindle
#

wait, the old event system is still in the API? o_O

harsh anvil
#

i'm using an old #unsupported version

#

but iirc its still in there

#

even in 1.15

gusty crane
#

How would i use the .playEffect(arg0, arg1, arg2);

#

ive read the docs and all but still

subtle blade
#

It does not, DarkEye. No. You cannot listen to abstract events

#

And yes, it's still present because it's still useable, Syd

harsh anvil
#

ugh

#

no wonder it never got handled then

#

wait, how is PlayerEvent abstract

#

or are you talking about the subclasses

#

man i'm just gonna go to bed, i cant think anymore

ashen stirrup
harsh anvil
gusty crane
#

same^

ashen stirrup
#

Aha xD

wheat pumice
#

xin chร o

#

ร  nhแบงm cรณ ai viแป‡t nam k nhแป‰

#

hey guys i have a problem with my plugin

#

@EventHandler
public void ammoRequire(WeaponReloadEvent event) {
Player p = event.getPlayer();
Inventory inv = p.getInventory();
String g = event.getWeaponTitle();
ItemStack ammo = new ItemStack(Material.IRON_INGOT, 1);
ItemMeta meta = ammo.getItemMeta();
meta.setDisplayName(plugin.getConfig().getString("Guns."+ g +".ammo.name"));
ammo.setItemMeta(meta);
if (inv.contains(ammo)) {
p.sendMessage("You have ammo");
}
else {
p.sendMessage("You dont have ammo");
}
}

#

althoug i have this ammo, the plugin return message "You dont have ammo"

ashen stirrup
#

Do you have ammo?

harsh anvil
#

You also might want to wrap that in code tags

ashen stirrup
#

^

harsh anvil
#

Contains compares objects. Use isSimilar

#

Wait

wheat pumice
#

Do you have ammo?
@ashen stirrup i have ammo

harsh anvil
#

Yeah I don't think you can use inv.contains here

#

As they're not the same objects

wheat pumice
#

i dont know how to use discord code tag

ashen stirrup
#

` 3 times

#

e.g

harsh anvil
#

Loop over the inventory instead and use Itemstack#isSimilar

ashen stirrup
#
System.out.println("test");
wheat pumice
#
System.out.println("test");

@ashen stirrup how to do that :vv

harsh anvil
#

Exactly like that lol

wheat pumice
#

Loop over the inventory instead and use Itemstack#isSimilar
@harsh anvil thanks i will try

ashen stirrup
#
for(ItemStack item : player.getInventory()){
}
#

Loop like that

#

Wait no

#

player.getInventory().getContents()

wheat pumice
#
thank you
ashen stirrup
#

After the first 3 `s add "java" for it to be colorized

harsh anvil
#

So why doesn't PlayerEvent trigger @EventHandlers?

wheat pumice
#
like this ?
ashen stirrup
#

Yes

dusky herald
#

@subtle blade Well, I got it to work. I guess it was Maven; but figured out how to setup maven and all that. My code worked first try btw lmao

harsh anvil
#

It extends event so I don't see why it wouldn't

subtle blade
#

So why doesn't PlayerEvent trigger @EventHandlers?
Because it's an abstract event that can't ever be constructed. Its calls aren't propagated upwards because it has no handler list

#

If an event class is labelled as abstract, you can't listen to it

#

That's the general rule of thumb

pastel basin
#

@wheat pumice why don't you try

inv.contains(Material.IRON_INGOT)

since ammo is just iron ingots

harsh anvil
#

Hmm I see. I guess that answers why I can't register a list of parent type either... That's... Really going to fuk me over :/

#

Is there a way to do it without having to cast everything to the child type?

#

Cuz I have like 33 types

#

That I all need to register

subtle blade
#

You would have to listen to each individual event, unfortunately. The drawbacks of the event API

harsh anvil
#

Is there a way to cast "dynamicly" like cast to the classes actual type?

#

Or do I have to do it manually

fleet crane
#

It's unlikely you're gonna get useful information even if you could just listen to every playerevent

#

What does knowing that a player did an event help you without knowing anything about the event context

subtle blade
#

You'd have to instanceof and cast in that same listener anyways

harsh anvil
#

I just yoinked an event from paper and they used the PlayerEvent instead of event so I stick with it. Ig it doesn't really matter in this case

#

Thanks :)

wheat pumice
#

@wheat pumice why don't you try

inv.contains(Material.IRON_INGOT)

since ammo is just iron ingots
@pastel basin i need the ammo have a name

ashen stirrup
#

Check the name after

pastel basin
#

oh, I don't know why Inventory#contains(ItemStack) isn't working there, so just do what @ashen stirrup said then

ashen stirrup
#

๐Ÿ˜„

velvet halo
#
    {
      "name": "?3Immortal ?eHelmet",
      "material": "DIAMOND_HELMET",
      "amount": 1,
      "lore": [
        "?3Immortal"
      ],
      "enchants": {
        "unbreaking": 3,
        "protection": 3,
        "aqua_affinity": 1
      }
    },
``` Having a small issue with JSON deserialization. The chatcolor gets replaced with a question mark. Has anyone stumbled across this issue before?
drowsy hinge
#

@velvet halo are you encoding the file as UTF-8? that is necessary for the section symbol to save properly.

subtle blade
#

(and is the reason people often use & instead)

velvet halo
#

I am using &

#
    public void write(String name, T t) {
        try {
            File file = new File(directory + File.separator + name + ".json");
            if(!file.exists()) file.createNewFile();

            try (Writer writer = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) {
                writer.write(gson.toJson(t));
                writer.flush();
            } catch (IOException e) {
                e.printStackTrace();
            }

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
``` Alright yeah that fixed it
#

Thanks for the help

drowsy hinge
#

np!

mild plaza
#

Hi! can someone help me? Because i installed ChestShop, and when I touch the sign instead of buy the product, i open the chest

frigid ember
#

how do i disable phantoms from spawning in

final verge
#

Isnโ€™t it like /gamerule doInsomniaCycle false?

wheat pumice
#

how can i move player crosshair without using teleport

sand helm
tiny dagger
#

Probably modifying it directly :p

sand helm
#

wdym

#

@tiny dagger

proper kiln
#

How do I make a "virtual furnace" obtained from the "TileEntityFurnace" class work? , because even if I put meat and coal on it, it doesn't work.

wheat pumice
#

how can i move player crosshair without using teleport in bukkit code

fleet crane
#

You have to teleport them

#

?xy

worldly heathBOT
fierce tinsel
#

can someone helpe me with the mcmmo plugin

#

anyone????

mellow bobcat
#

u guys got some tips for a prison rank plug-in except EZRanksPro

tiny dagger
#

@sand helm i was saying about how he could modify yaw pitch directly

#

btw how does one sets a fixed size for a jtextfield button?

#

it keeps pushing my last button off the screen

tiny dagger
hoary parcel
#

maven doesnt allow you to use two versions of the same dependency

#

use modules

fleet burrow
#

How can I get an NBTTagCompound from a map?

#

Should I use reflection? to use the private constructor?

naive goblet
#

Yes I think you have to

tepid burrow
#

@fleet burrow I do not know what you are trying to achieve, and I have never used this library, but it looks like it might be what you are looking for https://github.com/tr7zw/Item-NBT-API

trail zephyr
#

How can I setup logger groups in Spigot default logger ?

#

I need to enable logging of org.hibernate.tool.hbm2ddl

fleet burrow
#

Can someone send me an example use of NBTCompressedStreamTools.a with NBTTagCompound as one of the arguments

#

for 1.15

shadow trail
#

help

#

[04:33:32] [Server thread/ERROR]: #!#!
[04:33:32] [Server thread/ERROR]: #!#! Version Information:
[04:33:32] [Server thread/ERROR]: #!#! Skript: 2.4 (OUTDATED)
[04:33:32] [Server thread/ERROR]: #!#! Flavor: skriptlang-github
[04:33:32] [Server thread/ERROR]: #!#! Date: 2019-11-30
[04:33:32] [Server thread/ERROR]: #!#! Bukkit: 1.15.2-R0.1-SNAPSHOT
[04:33:32] [Server thread/ERROR]: #!#! Minecraft: 1.15.2
[04:33:32] [Server thread/ERROR]: #!#! Java: 1.8.0_231 (Java HotSpot(TM) Client VM 25.231-b11)
[04:33:32] [Server thread/ERROR]: #!#! OS: Windows 10 x86 10.0
[04:33:32] [Server thread/ERROR]: #!#!
[04:33:32] [Server thread/ERROR]: #!#! Server platform: Spigot
[04:33:32] [Server thread/ERROR]: #!#!
[04:33:32] [Server thread/ERROR]: #!#! Current node: null
[04:33:32] [Server thread/ERROR]: #!#! Current item: format a gui slot [[long:0]] of the player with ([[itemtype:black stained glass pane]] named "ยบ7" >> ch.njol.skript.classes.data.DefaultConverters$13@1c41465: itemtype -> itemstack)
[04:33:32] [Server thread/ERROR]: #!#! Current trigger: command /kit (simple event) (kits.sk, line -1)
[04:33:32] [Server thread/ERROR]: #!#!
[04:33:32] [Server thread/ERROR]: #!#! Thread: Server thread
[04:33:32] [Server thread/ERROR]: #!#!
[04:33:32] [Server thread/ERROR]: #!#! Language: english
[04:33:32] [Server thread/ERROR]: #!#! Link parse mode: DISABLED
[04:33:32] [Server thread/ERROR]: #!#!
[04:33:32] [Server thread/ERROR]: #!#! End of Error.
[04:33:32] [Server thread/ERROR]: #!#!

#

tit shows no error

neat oxide
#

Skript is not supported here

shadow trail
#

but when i perform /kit

#

๐Ÿ˜ฆ

neat oxide
#

go to the skript discord

shadow trail
#

wat is it

neat oxide
#

google it

#

Anyone from the dev team able to tell me how i can bind my darn remote debugger to debug NMS code

stone oxide
#

Hi. Is there a way to "maven install" a JAR file of a plugin right into D:\MyServer\plugins\ folder? Now I gotta copy the JAR file from PluginProject\target folder. It works, but it's a little annoying.
Maybe there's a way to copy the JAR from the target folder?

uneven sandal
#

Is it just me, or is the update checker running a bit slow. I've updated my plugin twice (to fix some stuff) and the spigot checker still sends a message about there being an update even though they download the newest version from the plugin page, they still get the "there is an update" message..

tepid burrow
#

Are you using Spiget for update checking?

solemn grove
#

@stone oxide you can make a .bat file for that tho

tepid burrow
#

He is on windows

solemn grove
#

build + move

uneven sandal
#

Using the update checker from the Spigot Wiki - Yes, i'm using the https like in md_5's post.

solemn grove
#

ok

tepid burrow
#

Hm, then I dont know. I know that the Spiget API is really slow in updating

stone oxide
#

@stone oxide you can make a .bat file for that tho
@solemn grove I added 'xcopy from to /y' command into my server launch bat! That'll do I guess

fleet burrow
#

How would I go about serializing an NBTTagCompound?
I tried getting it's map and serializing it but then I get an exception that I can't cast x to NBTBase when constructing NBT from a map

#

That's the error

tepid burrow
#

Looks like you need to create a new instance of NBTBase / NBTTagCompound. How? I dont know. But these classes are obviously not subclasses of a LinkedTreeMap

#

So casting them wont work

sour dock
#

I'm pretty sure there is a method for converting json to nbt

#

first use gson to serialize the map, then convert that json to nbt

dull ingot
#

yall talking about itemstack NBT or tileentity NBT

half marsh
#

Hey guys, I'm developing a plugin where I'll be accessing a database. I know that for performance reasons it's best to do this asynchronously but I need one task, one to check if something already exists in a mysql database, to return a true or false. I know this should be done using callbacks, but I'm having trouble understanding how that works. The explanations i found online also don't bring much clarity, they pretty much just say "do x and y to make callbacks" which doesnt explain much in how it functions

normal socket
#

hi guys, can someone please recommend a simple tablist plugin that works on 1.15.2?
I use vanilla teams for colors and prefixes, so I don't want the plugin to modify that, all I want is a customizable header and maybe footer

crystal trench
#

@half marsh Basically you say to your friend to calculate 9*2, he thinks for a little bit and then gives you answer.
You - Main thread
Friend - other thread (async)
Answer - callback

#

Something like this ๐Ÿคทโ€โ™‚๏ธ

stone oxide
#

callback is more like your request to tell you the result

half marsh
#

So if I understand right I start an async task where it checks if a row already exists in a table and the callback would be the task running a function back on the main thread where the code continues, kind of

#

where it feeds the result of that sql check to that function

crystal trench
#

If you do something like: callback.result(exists), this function will be called in async. If you would like to make it on main thread, you would need to do something like this:

new BukkitRunnable() {
  @Override
  public void run() {
    callback.result(exists);
  }
}.runTask(plugin);
naive goblet
#

Wew use BukkitScheduler please

half marsh
#

what's the difference

naive goblet
#

BukkitTask task = Bukkit.getSheduler().runTask(plugin, () ->{ //code without });

#

Lambdas

#

Is one

#

And Iโ€™d say Runnable over BukkitRunnable

static zodiac
#

Guys, how to get material from something like that "minecraft:lapis_lazuli" ?

naive goblet
#

Maybe Material.getMaterial()

#

Or perhaps matchMaterial()

static zodiac
#

I got null from this

naive goblet
#

Maybe try to remove minecraft: first

sour dock
#

pretty sure you'd need to use NMS

cloud sparrow
#

Means you aren't correctly putting the right name for the material.

#

NMS for what?

sour dock
#

translating minecraft item names to bukkit materials

cloud sparrow
#

Materials can be grabbed by Material.matchMaterial or Material.valueOf dependent on version but what version @static zodiac.

sour dock
#

sometimes bukkit material names are different from minecraft item names, especially when using <1.13

cloud sparrow
#

1.8:

#
ItemStack lapis = new ItemStack(Material.INK_SANK, 1, (byte) 1);
fleet burrow
#

How can I serialize NBT?

sour dock
fleet burrow
#

nah

frigid ember
#

How do I disable spark from constantly telling this:

[14:59:51] [Craft Scheduler Thread - 960/INFO]: [โšก] Tick #1276797 lasted 135.71 ms. (21.04% increase from avg)

fleet burrow
#

ยฏ_(ใƒ„)_/ยฏ

neat oxide
#

ยฏ_(ใƒ„)_/ยฏ

subtle minnow
#

A question, CMI or EssentialsX ๐Ÿ‘€

fleet burrow
#

Also, no, it won't ๐Ÿ˜›

#

Won't solve what I need

neat oxide
#

Redfox essentialsx

subtle minnow
#

why?

neat oxide
#

im just very used to essentials cant see myslef using anything else

#

Anyone here knows when the crafttileentity interfaces are created

#

im hitting like 5 walls at the same time and im going slowly mad

frigid ember
#

How do I disable spark from constantly telling this:
Suggestions?

#

[14:59:51] [Craft Scheduler Thread - 960/INFO]: [โšก] Tick #1276797 lasted 135.71 ms. (21.04% increase from avg)

crystal trench
static zodiac
#

@cloud sparrow 1.15

fleet burrow
#

NBTTagCompound

cloud sparrow
#

Material.LAPIS_LAZULI

#

I can't really help you if you aren't coding.

static zodiac
#

Who said I don't code?

naive goblet
#

It was pretty obvious you code? Wym

static zodiac
#

yes

stone oxide
#

Is there a way to sudo a user to do a command (like player.chat(cmd);) without firing a PlayerCommandPreprocessEvent event?
I have an idea to make a global flag, turn it off before executing a command and turning it on afterwards, and in the event if the flag is turned off, then skip the code in the event handler, but that sounds like a dirty workaround.

fleet burrow
frigid ember
#

Hey guys. I'm developing my own plugin. write event. and no any suggestion that getPlayer in PlayerJoinEvent. Sorry for my Enlgish.

stone oxide
#

What IDE are you using?

frigid ember
#

IntelliJ IDEA

stone oxide
#

Did you include the javadoc jar in the project settings?

frigid ember
#

yes PlayerJoinEvent is available on tab suggesion

#

BUT no event. suggestion

#

Oh! I got it this was problem, @EventListener !

trail zephyr
#

Can someone help me?
My plugin uses log4j as logger and this is my config:

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

I want to output everything to Minecraft console, how can I do that? System.out doesn't work

ashen stirrup
#

Can someone help me with colour coded names?

        String[] nameCut = displayname.split(" ");
        System.out.println(nameCut[0]); // Outputs "ยบe<SPAWNERNAME>" e.g "ยบeBLAZE"
        EntityType spawnerType = Enums.getIfPresent(EntityType.class, nameCut[0].toUpperCase().replace("ยบe", "")).or(EntityType.PIG);
#

The ยบe is stopping the code from working since it gets the spawner type from the first word of the spawner name.

woven saddle
#

ChatColor.translateAlternateColor('&', message)

cloud sparrow
#

are you trying to remove chatColor?

#
ChatColor.stripColor(string);
ashen stirrup
#

Actually don't worry, fixed it

woven saddle
#

How do i detect if the fishing hook hit a block ?
and if the player's fishing rod is in state deployed or retracted ?

ashen stirrup
#

Can you get the location of the hook?

#

@woven saddle

woven saddle
#

I don't know in which event

#

Oh i think i got it

#

EntityInteractEvent

#

which has a getBlock() method

#

But now how can i check who the hook belongs to ?

winter hare
#

Hello lovely spigot people! I have some frustration that you may be able to help me with. I'm trying to set up some /scoreboard stuff on my server, but for some reason the color option and nametagvisibility option does not actually apply, on my spigot server. So far I don't really have plug-ins except some basic Skript plug-ins, but no skripts yet.

#

Is scoreboard nametag changes somehow not working in spigot 1.12.2?

lusty surge
#

Where does it get power from?

winter hare
#

is there a button or lever or source on top or behind the joining walls? Torch below?

sour dock
#

redstone torches below? repeaters?

lusty surge
#

Basically im doing a comparator.

#

Hopper system.

#

For a shop system.

sour dock
#

what's behind and under the sand

lusty surge
#

Nothing.

#

Anyways.

#

Whenever

sour dock
#

there has to be something because it's powered

winter hare
#

oh I see

lusty surge
#

Let me talk.

sour dock
#

and the repeaters are pointing away, right?

lusty surge
#

Nah.

#

Yeah.

#

I mean

winter hare
#

The repeater is pointing into a block where redstone is right next to it

sour dock
#

ah yes

lusty surge
#

yea

#

Fixed.

#

Still problem

#

Let me

#

Explain

#

my system.

#

Basically its a system for a store which checks if a person drops a diamond into the hopper

#

18 Diamonds are in the hopper

#
  • 4 random blocks
#

So its 22

#

and once its 23

#

It activates a 2-block redstone

#

And the comparator Unlocks the hopper

#

So it can drop that one diamond.

#

THen locks it back.

#

Basically.

#

The redstone that is unlocking the hopper.

#

Activiates forever.

#

And never deactiviates

#

It only updates if I destroy a redstone from it.

#

@sour dock

#

nvm

winter hare
#

Please? Anyone that can answer if spigot somehow overrules the nametag options for /scoreboard? I'm using the teams to make the nametags disappear over players' heads. It works on a lan world, but for some reason not on the spigot server?

frigid ember
#

How do I disable spark from constantly telling this:
Suggestions?
[14:59:51] [Craft Scheduler Thread - 960/INFO]: [โšก] Tick #1276797 lasted 135.71 ms. (21.04% increase from avg)

lapis dune
#

How do i download spigot?

#

I loooked through the download links but couldnt find it

fervent crescent
#

hey guys, any tutorial with jedis?
i need to communicate all spigot servers

pastel basin
#

@lapis dune download buildtools and run

lapis dune
#

Ok thxs

sour dock
#

hubkick plugin

winter hare
#

Btw guys when I say /scoreboard I mean the vanilla command. Not the plug-in that apparently exist..

crystal trench
#

1.8 ๐Ÿคฎ

low spruce
#

what are the chat commands for harber sleep?

#

nevermind, ill ask somewhere else

neat oxide
#

@frigid ember This is spigot for paper support go to their discord

hoary parcel
#

you dont get 1.8 support there either

#

1.8 is dead

zenith siren
#

If I create a scoreboard and then the server restarts will the scoreboard still exist?

winter hare
#

is it the built in vanilla /scoreboard command?

zenith siren
#

No, I create it via the Bukkit API

winter hare
#

Okay

frigid ember
#

does keep chunks loaded save perfomance???
1.12.2 PAPER

naive goblet
#

@zenith siren I think it will But it might be buggy.

subtle blade
#

Hello, Slade. Welcome to the Spigot server

silk bane
#

@frigid ember if you're referring to Paper's keep-spawn-loaded option, afaik it only makes a difference if people die and respawn at the world spawn.

#

if you set it to false, you'll save a bit of memory when nobody's at the world spawn, at the cost of having to load the chunks again if anyone respawns there

subtle blade
#

HELLO KONSOLAS, WELCOME TO THE SPIGOT SERVER

silk bane
#

chill choco

subtle blade
#

We really should start kicking people for support with forks though ยฏ_(ใƒ„)_/ยฏ

silk bane
#

is it that big of a deal?

subtle blade
#

We are quite obviously not Paper. Not sure how much clearer it can be

#

Given the "Spigot" icon, the "SpigotMC" server name

#

The "Spigotcraft" server channel

#

Don't care if people use it. Use what you feel best suits your server. Though if you're seeking support, it should be at the point of support that actually maintains the software

#

Not the upstream that has no knowledge of what changes downstream makes

#

It's really not that difficult

jagged umbra
#

Are you considering kicking people for asking support with Paper or giving help with Paper?

silk bane
#

it is broadly the same community though - stuff posted in this server isn't necessarily targeted at the maintainers of spigot, but to the community in general

#

and yeah, kicking people seems unnecessarily combative

subtle blade
#

But use some common sense at least. Why should we be holding the weight of something that does not have anything to do with us

#

Literally click to another server and ask your same question

jagged umbra
#

Right, a kick seems excessive for a misunderstanding, though.

subtle blade
#

The alternative is deleting messages and having chat flooded with "why did you delete my message" and a repeat of the question

#

You can join back after a kick

jagged umbra
#

Ah I was thinking ban, not kick

subtle blade
#

Besides - I said we should start, not that we will. That's a decision to be made by md, not me

neat oxide
#

Also can we start warning people for asking help outside of help channel

#

im tired of seeing people with stupid question

#

also FAQ channel or pinned message would be nice

subtle blade
#

There you go

neat oxide
#

Its a honor ill get started

subtle blade
#

You were saying? kappa

neat oxide
#

๐Ÿ˜ฆ

#

bully

subtle blade
#

I'm a bit of a bully, yea

neat oxide
#

i thought Canadians where supposed to be nice

subtle blade
#

We are! 90% of the time ๐Ÿ™Š

silk bane
#

it all gets bottled up

subtle blade
#

Yea, and then some poor individual rubs us the wrong way and it all gets unleashed on them

#

Though we say sorry after

#

Fun fact: Sorry has so many different meanings in Canada ranging from "dude, it was your fucking fault, dick..." to "i'm so sorry, i didn't mean it, eh"

vernal basalt
#

Hi.

#

I have a problem

#

I turned off my server and after starting i get this error

#

Failed to schedule load callback for chunk [-12, -18]
java.util.concurrent.CompletionException: java.lang.NullPointerException

#

Any ideas?

fleet burrow
hoary parcel
#

sending dum packets

jagged umbra
#

packet loss or corruption typically

#

Possibly a corrupted chunk @vernal basalt?

#

Did you stop it, or did it crash?

vernal basalt
#

and how can i fix this?

hoary parcel
#

turn on client debug logged and see which packet caused it

vernal basalt
#

I stopped it

wanton delta
#

back to chocos point

#

paper even said

#

"we are not spigot dont equate us with them"

#

like why should we do the same

#

makes sense

#

ยฏ_(ใƒ„)_/ยฏ

final verge
#

Itโ€™s like someone asking for crates reloaded support in crazy crates help

#

Which happens more often than one might think

wanton delta
#

paper has their own discord

#

their own irc

#

twitter

#

etc

frigid ember
#
> [19:40:40] [Spigot Watchdog Thread/ERROR]: ------------------------------
> [19:40:40] [Spigot Watchdog Thread/ERROR]: The server has stopped responding! This is (probably) not a Spigot bug.
> [19:40:40] [Spigot Watchdog Thread/ERROR]: If you see a plugin in the Server thread dump below, then please report it to that author
> [19:40:40] [Spigot Watchdog Thread/ERROR]: *Especially* if it looks like HTTP or MySQL operations are occurring
> [19:40:40] [Spigot Watchdog Thread/ERROR]: If you see a world save or edit, then it means you did far more than your server can handle at once
> [19:40:40] [Spigot Watchdog Thread/ERROR]: If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes
> [19:40:40] [Spigot Watchdog Thread/ERROR]: If you are unsure or still think this is a Spigot bug, please report to https://www.spigotmc.org/
> [19:40:40] [Spigot Watchdog Thread/ERROR]: Be sure to include ALL relevant console errors and Minecraft crash reports
> [19:40:40] [Spigot Watchdog Thread/ERROR]: Spigot version: git-Spigot-800b93f-8160e29 (MC: 1.15.2)
#

Great

#
 [19:40:50] [Spigot Watchdog Thread/ERROR]: Current Thread: luckperms-scheduler-worker-137
> [19:40:50] [Spigot Watchdog Thread/ERROR]: PID: 382 | Suspended: false | Native: false | State: TIMED_WAITING
> [19:40:50] [Spigot Watchdog Thread/ERROR]: Stack:
> [19:40:50] [Spigot Watchdog Thread/ERROR]: sun.misc.Unsafe.park(Native Method)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.lang.Thread.run(Thread.java:748)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: ------------------------------
> [19:40:50] [Spigot Watchdog Thread/ERROR]: Current Thread: luckperms-scheduler-worker-135
#
Current Thread: Netty Epoll Server IO #3
> [19:40:50] [Spigot Watchdog Thread/ERROR]: PID: 200 | Suspended: false | Native: false | State: RUNNABLE
> [19:40:50] [Spigot Watchdog Thread/ERROR]: Stack:
> [19:40:50] [Spigot Watchdog Thread/ERROR]: io.netty.channel.epoll.Native.epollWait0(Native Method)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: io.netty.channel.epoll.Native.epollWait(Native.java:114)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: io.netty.channel.epoll.EpollEventLoop.epollWait(EpollEventLoop.java:239)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:256)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.lang.Thread.run(Thread.java:748)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: ------------------------------
> [19:40:50] [Spigot Watchdog Thread/ERROR]: Current Thread: Netty Epoll Server IO #2

And many more

#

Any suggestions for fixing?

subtle blade
#

luckperms-scheduler-worker-135
aPES_QuickDab

wanton delta
frigid ember
#

So I need to use Paper?

wanton delta
#

no

#

that was unrelated ot your problem

frigid ember
#

K

dusky herald
#
[13:41:16 WARN]:     at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:689)
[13:41:16 WARN]:     at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:196)
[13:41:16 WARN]:     at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:161)
[13:41:16 WARN]:     at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:100)
[13:41:16 WARN]:     at com.Blackveiled.Diablic.Database.Database.getConnection(Database.java:187)
[13:41:16 WARN]:     at com.Blackveiled.Diablic.Database.Database.prepareStatement(Database.java:162)
[13:41:16 WARN]:     at com.Blackveiled.Diablic.WarpManager$1.run(WarpManager.java:110)
[13:41:16 WARN]:     at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:81)
[13:41:16 WARN]:     at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54)
[13:41:16 WARN]:     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[13:41:16 WARN]:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[13:41:16 WARN]:     at java.lang.Thread.run(Unknown Source)
[13:41:16 WARN]: [Diablic] Plugin Diablic v1.0 generated an exception while executing task 54
java.lang.NullPointerException: null```

Anyone know why HikariCP is not returning connections back to the pool?  I'm closing out my connections after I send queries; I ran up to 50 connections on my pool to test this out and after I run around that many queries I no longer have connections I can access anymore.
#

Example:

        if (isConnected()) {
            Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
                @Override
                public void run() {
                    try {
                        Connection connection = preparedStatement.getConnection();
                        preparedStatement.execute();

                        connection.close();

                    } catch (SQLException e) {
                        e.printStackTrace();
                    }
                }
            });
        }
    }```
#

and yes, this is retrieving the Connection from the HikariDataSource.

frigid ember
#

Just a thing
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
@Override
public void run() {

Idk if this is possible but a public void in a Overrided public void

#

I have never seen that.

#

:/

subtle blade
#

Anonymous classes

dusky herald
#

Either way, it still works. The queries are executed properly within.

#

I'm just having issues with the connection closing and being placed back into the pool.

#

What you mean Choco

subtle blade
#

Explaining Thijssie's confusion. It's valid. Overriding a method in the Runnable implementation

dusky herald
#

Yeah, it doesn't matter if it's public void or not, it's overriding a method.

subtle blade
#

Close the statement as well. In fact, you don't need to close the connection explicitly because closing the statement will close the connection

#
preparedStatement.execute();
preparedStatement.close();```
#

Also, in this case, a lamba will work a little nicer

#
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
    preparedStatement.execute();
    preparedStatement.close();
});```
#

Quick and easy

dusky herald
#

I'll give it a shot; one sec

wraith grail
#

player.setRemainingAir() will not do anything if I set EntityAirChangeEvent to canceled for a player (or overall), the only reason I do set it as cancelled is because I want to take over all control over air regain and air loss from the game. If I do not set is as cancelled. things kinda work but don't work out as I want them to as the math get's effed up. So is there a better way to do this so setRemainingAir works while also preventing minecraft from using it's own stuff for the air loss and regeneration? Basically I think it's far to easy to dive underwater in the game.

dusky herald
#

Eh, nope.

#

My connection still isnt returning to the pool.

frigid ember
#

Hey guys, can I have an enum with enum values inside

   IRON_ARMOR,
   LEATHER_ARMOR,
   CHAIN_ARMOR(Material.CHAINMAIL_CHESTPLATE, Material.CHAINMAIL_LEGGINGS, Material.CHAINMAIL_HELMET),
   SWORD(Material.IRON_SWORD, Material.WOODEN_SWORD),
   DIAMOND_SWORD(Material.DIAMOND_SWORD);
   
   private Material[] materials;
    
   EnchantMat(Material... mat){
       this.materials = mat;
   }
   
   public Material[] getAllMaterials() {
       return materials;
   }
}
subtle blade
#

Yes. Yes you do

#

Oh, can you. Yes. Absolutely

quick arch
#

e.e

subtle blade
#

Though if you're checking contains frequently, I think an EnumSet would be preferred rather than a Material array

#

Sets.immutableEnumSet(mat)

frigid ember
#

Ok thanks

#

@subtle blade would I be able to use .clone() instead

subtle blade
#

For what?

frigid ember
#
public enum EnchantMat {

   IRON_ARMOR,
   LEATHER_ARMOR,
   CHAIN_ARMOR(Material.CHAINMAIL_CHESTPLATE, Material.CHAINMAIL_LEGGINGS, Material.CHAINMAIL_HELMET),
   SWORD(Material.IRON_SWORD, Material.WOODEN_SWORD),
   DIAMOND_SWORD(Material.DIAMOND_SWORD);
   
   private Material[] materials;
    
   EnchantMat(Material... mat){
       this.materials = mat;
   }
   
   public Material[] getAllMaterials() {
       return materials.clone();
   }
}

So it would look like this instead

subtle blade
#

There's two reasons an EnumSet would be better here

  1. If you create one that's immutable (i.e. from Guava), it's unchangeable when fetched from a method
  2. Its calls to #contains() are significantly faster because it holds constants in a bit vector. O(1) operation
cosmic token
#

Truly no clue what I did wrong

frigid ember
#

@subtle blade , so it would look like this?

public enum EnchantMat {

   CHAIN_ARMOR(EnumSet.of(Material.CHAINMAIL_CHESTPLATE, Material.CHAINMAIL_LEGGINGS, Material.CHAINMAIL_HELMET)),
   DIAMOND_SWORD(EnumSet.of(Material.DIAMOND_SWORD));
   
   private ImmutableSet<Material> materials;
    
   EnchantMat(EnumSet<Material> mat){
       this.materials = Sets.immutableEnumSet(mat);
   }
   
   public ImmutableSet<Material> getAllMaterials() {
       return materials;
   }
}
subtle blade
#

Yes, though unless you're iterating over those materials, it would probably be better to just have a method that returns a boolean if the set contains the constant

frigid ember
#

Alright thanks

subtle blade
#

public boolean includes(Material) or whatever

#

And finalize the materials field! ๐Ÿ˜„

frigid ember
#

Ok

silk bane
#

i think you can also move the EnumSet.of to the constructor

#

and make the argument Material...

subtle blade
#

Oh I hadn't even noticed that, yea. If you just make varargs

modest matrix
#

Hello, Can someone help me implement "HikariCP" to my plugin, which already has MySQL? However it is made precariously

frigid ember
#

Do you have Vault installed Digger?

chrome lark
#

they give examples on their wiki

#

it's basically case of calling getConnection() on the datasource object when you wanna run some sql

fleet burrow
clever cargo
#

hello, I want to disable the list of commands in the chat for the players of my server and they cannot see them, in spigot.yml I changed the TAB-COMPLETE to -1, it is deactivated, but now a message appears while I type the command and it is " Unknown command for position: 1 "and it's kind of annoying, if someone could help me remove it I would appreciate it too much

fleet burrow
silk bane
#

what are you doing

#

are you implementing a bukkit interface?

#

don't do that

fleet burrow
#

I'm not

#

also nvm lmao

ashen stirrup
#

How do you cancel ExpDrop from Spawners?

silk bane
#

BlockBreakEvent#setExpToDrop(0)?

ashen stirrup
#

Doesn't seem to be a method.

final verge
#

better question

#

on what version of spigot

ashen stirrup
#

1.15.2

fleet burrow
#

Is it possible to change an ItemStack's NBT without creating a copy of it?

subtle blade
#

Ehm, sure. ItemStacks are mutable. Though you have to re-set it in the inventory once you've changed it

boreal tiger
subtle blade
#

Copies of items are made when fetched from NMS

#

Man. ItemStack really should have been an interface, huh? lol

ashen stirrup
#

Oh, BlockExpEvent

silk bane
#

which BlockBreakEvent subclasses.

boreal tiger
#

no,

#

wait

#

BlockBreakEvent inherits that

subtle blade
#

Yes. setExpToDrop() is inhereted from BlockExpEvent