#help-archived

1 messages · Page 110 of 1

frigid ember
#

one is deprecated and one is well

bronze marten
#

segment fault doesn’t have errors in plain english

subtle blade
#

The deprecated one will take a BukkitRunnable which won't actually work properly lol

alpine cedar
#

you can also do this
@echo off
cls
:loop
git add --all :/
git commit -m "AutoUpdate"
git push
cls
echo Push complete!
echo waiting 1 minute before repushing...
TIMEOUT /T 60 > nul
goto loop

sturdy oar
#

Is someone able to help with GSON and custom Object deserialization?

keen compass
#

next time either use the paste site or surround your errors/code with 3 back ticks ` @torpid field

sturdy oar
#

I'm getting some errors, but I have spent already few hours reading the docs, and don't seem to understand

#

what's causing the IllegalStateException

subtle blade
#

Though scheduleRepeatingTask() can take a Runnable which isn't deprecated and can be used if you'd like

#

Just don't use the deprecated ones. There are alternatives

kind crow
#

is there an event for anvil renaming? I couldn't find it

bronze marten
#

@alpine cedar cursed

sturdy oar
#

I'm like 100% sure that what I'm serializing should be an Array

subtle blade
#

Ehm, not really, Rundik. You kind of have to check for that yourself with an InventoryClickEvent

#

If the inventory is an anvil, you can cast it to an AnvilInventory and getRenameText()

bronze marten
#

Json array =/= Array @sturdy oar

keen compass
#

@sturdy oar are you certain it is valid json array? and not just you thinking it is one?

sturdy oar
subtle blade
#

That JSON formatting makes me cry

sturdy oar
#

and I do deserialize it this way, but I don't see why it breaks inside the chapters

kind crow
#

If the inventory is an anvil, you can cast it to an AnvilInventory and getRenameText()
@subtle blade I found PrepareAnvilEvent, can I use this somehow?

subtle blade
#

PrepareAnvilEvent is called when the item is put in the anvil

#

Not when it's taken out

#

Figured there'd be an AnvilItemRepairEvent or something but guess not

sturdy oar
#

"chapers", should contain an array of chapters, and each chapters should contain an array of pages, and each page an array of verses (strings)

subtle blade
#

I would not put that past being client-sided

#

I know anvils are weird like that

keen compass
#

Wouldn't it trigger the CraftEvent?

#

when you do the actual repair

kind crow
#

Not when it's taken out
@subtle blade Is it possible to add Inventory event listener when the item is put in the anvil and remove it afterwards? Would it be better for performance?

subtle blade
#

It might but I doubt that, Frostalf

#

No that's for CraftingInventory

kind crow
subtle blade
#

Yea that's pretty much how I had suggested you do it as well

keen compass
#

Ah ok, yeah I think it is client side when taking the item out of an anvil for the repair

subtle blade
#

Though I think there are constants for those anvil slots if I'm not mistaken

kind crow
#

Though I think there are constants for those anvil slots if I'm not mistaken
@subtle blade do you mean this if(inv instanceof AnvilInventory){ ?

subtle blade
#

Nah I meant slot 2 being the output slot for instance, but maybe there aren't

kind crow
#

ok, thanks. I'll try the solution from the link. I think it would work

sturdy oar
#

nvm guys i fixed my deserialization

odd knoll
#

JSON is lovely.

#

Just that pretty formatting messed stuff for me.

sturdy oar
#

I don't even know how I fixed

#

it just works

odd knoll
#

Sounds like most issues.

torpid field
#

my Ide(eclipse) shoots errors when i try to use sender.sendMessage("blah blah string") in a command. Error: sender cannot be resolved to a type but if I parse sender as a player i can! Whats wrong?

#

with semi colons

sturdy oar
#

get a real IDE 🤷‍♂️

odd knoll
#

works fine for me with IntelliJ ¯_(ツ)_/¯

torpid field
#

lol maybe its just eclispe being shit

sturdy oar
#

maybe show full context

#

you may be doing something weird

torpid field
#

sure

north inlet
#

How can i detect a player taking damage (for everything)?

odd knoll
#

EntityDamageEvent?

sturdy oar
#

EntityDamageEvent with instance check

odd knoll
#

Yh.

north inlet
#

nice, ty

kind crow
sturdy oar
#

?

#

you set the new name lol

#

and you apply the new meta the the ItemStack

torpid field
#

code: ```public boolean onCommand(Command sender, Command cmd, String commandLabel, String[] args)
{
if(cmd.getName().equalsIgnoreCase("ping"))
{

        if (sender instanceof Player) 
        {
            sender.sendMessage("pong");
            
            Player p = (Player) sender;
            
            
            p.sendMessage(ChatColor.ITALIC + "Pong!");
            return true;
        }
        else 
        {    
            
            sender.sendMessage(ChatColor.DARK_GRAY + "Computers can't hear");
            return true;
        }
    }
    
    return true;
}```
kind crow
#

and you apply the new meta the the ItemStack
@sturdy oar how do I apply the new meta?

sturdy oar
#

now, i wonder, how will the method be named 🤣

kind crow
#

xD it worked, thanks

torpid field
#

have anyone got a plugin that can reload other plugins while the server is up? so there is no need to restart

sturdy oar
#

i mean,.. there is PlugMan

#

but I don't recommend it if you're looking for stable stuff

torpid field
#

ok then ill just go with restart

sturdy oar
#

can't you do like /plugin reload

#

if you need to reset a specific's plugin data

#

usually authors implement reloads

ripe ledge
#

There is an option to send a message to players that have a specific permission?

sturdy oar
#

check the permission?

torpid field
#

welp its my plugin and oc i am really pro so i have not xD

sturdy oar
#

it's not that hard to make a class storing values, and supporting reload

ripe ledge
#

check the permission?
@sturdy oar I know how to check permission but how I send message to specific players

torpid field
#

does it just enable the plugin agian

sturdy oar
#
Bukkit.getOnlinePlayers().stream()
                .filter(player -> player.hasPermission("perm"))
                .forEach(p -> p.sendMessage("ur msg"));

@ripe ledge

#

i don't know if this is what you needed , but I think so

#

it sends a message to each player with a permission

ripe ledge
#
Bukkit.getOnlinePlayers().stream()
                .filter(player -> player.hasPermission("perm"))
                .forEach(p -> p.sendMessage("ur msg"));

@ripe ledge
@sturdy oar Ok, thanks!

tiny dagger
#

streams 👀

sturdy oar
#

they're perfect for making things like that shorter

tiny dagger
#

well

#

you're looping 2 times behind the scenes

sturdy oar
#

he would've had to do this otherwise

for (final Player player : Bukkit.getOnlinePlayers())
    if(player.hasPermission("pex")) player.sendMessage("msg");
tiny dagger
#

didn't bukkit had Bukkit sendMessage(message, perm)?

sturdy oar
#

no idea

tiny dagger
#

pretty sure it does

subtle blade
#

It does, yes

#

Bukkit.broadcastMessage()

north inlet
#

how can i say a message in the chat when the plugin is activated?

subtle blade
#

No one would be on the server to send a message to when your plugin is enabling

#

Unless you're using /reload I suppose

north inlet
#

and how can i make that?

subtle blade
#

I don't understand the question. It's not something you need to do. There's no one online to see it and I guarantee you it's just an annoyance to see another message in chat after a reload

#

You can send a message to the console using your plugin's logger if you'd like.

north inlet
#

ok

dense surge
#

hi

#

can someone explain how i can install spigot mods?

#

Im trying to install it on a minehut server

subtle blade
#

?resources

dense surge
#

does it work there or do i need to use a different site

worldly heathBOT
dense surge
#

thanks

subtle blade
#

Can get plugins from there, drop them into the plugins folder

#

Through FTP or the in-built file system for your host's panel, whatever

frigid ember
#

I want to split a string, in such a way.

String str = "Hello Hi \"hello lol\" ok this is a test";```

I want to split the string for every space str.split(" "); but handle words in quotes as one
ripe ledge
#

Someone knows why event.getPlayer().hasPlayedBefore() not working? (it always thing that I don't played before)

#

Someone?

fossil shoal
#

What event is that?

ripe ledge
#

PlayerJoinEvent

#

@fossil shoal

fossil shoal
#

Maybe try making that check a few ticks later?

ripe ledge
#

Maybe try making that check a few ticks later?
@fossil shoal How?

fossil shoal
#

With the BukkitScheduler or a BukkitRunnable

ripe ledge
#

How exactly?

#

@fossil shoal

fossil shoal
#

BukkitScheduler#runTaskLater
BukkitRunnable#runTaskLater

ripe ledge
#

what

fossil shoal
#

And no need to ping me..

#

These are the methods

ripe ledge
#

k sorry

#

These are the methods
yeah but how I use them

fossil shoal
#

This link might be useful

ripe ledge
#

Ok thanks I will try this

empty salmon
#

Hey, anyone know what to do to open an anvil inventory?

ripe ledge
#
[19:11:28 WARN]: [RaptoR-Plugin] Task #63 for RaptoR-Plugin v1.0 generated an exception
java.lang.NullPointerException: permission
        at me.lucko.luckperms.bukkit.inject.permissible.LuckPermsPermissible.hasPermission(LuckPermsPermissible.java:172) ~[?:?]
        at org.bukkit.craftbukkit.v1_15_R1.entity.CraftHumanEntity.hasPermission(CraftHumanEntity.java:221) ~[patched_1.15.2.jar:git-Paper-226]
        at me.YaronD.RaptoR.CustomJoinLeave$1.lambda$0(CustomJoinLeave.java:26) ~[?:?]
        at java.lang.Iterable.forEach(Unknown Source) ~[?:1.8.0_251]
        at me.YaronD.RaptoR.CustomJoinLeave$1.run(CustomJoinLeave.java:23) ~[?:?]
        at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.15.2.jar:git-Paper-226]
        at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:461) ~[patched_1.15.2.jar:git-Paper-226]
        at net.minecraft.server.v1_15_R1.MinecraftServer.b(MinecraftServer.java:1240) ~[patched_1.15.2.jar:git-Paper-226]
        at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:430) ~[patched_1.15.2.jar:git-Paper-226]
        at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1157) ~[patched_1.15.2.jar:git-Paper-226]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:946) ~[patched_1.15.2.jar:git-Paper-226]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_251]

Someone can tell me what is the problem here?

slow swan
#

Does anyone know how to get "Å,Ä,Ö,å,ä,ö" working in the "unknown-command:" (spigot.yml) When I do it defaults to "Insufficient permissions...." I'm editing in VS Code.

naive goblet
#

Send your CustomJoinLeave @ripe ledge

#

@slow swan are you directly typing those into the config?

slow swan
#

Why yes, how else I ask...

naive goblet
#

When using special characters use double quotes for the value instead of single quotes. Then replace the special character itself with its unicode.

slow swan
#

Aha

naive goblet
#

You can probably google up the unicode for a specific character. Then when we’re putting it into config, you’d need to write something like this: ”\u<unicode>”

hidden mica
#

What is a time change event called?

naive goblet
#

Are you looking for TimeSkipEvent?

hidden mica
#

I don't think so

#

Like with WeatherChangeEvent, but with time

subtle blade
#

One is not called because time changes every single tick

#

Time is a tick based value

hidden mica
#

oh..

#

well how would i make a "all day" plugin then?

naive goblet
#

either have a looping task setting it to day or set the gamerule daylighCycle to false and then just simply set the time to day

pallid turret
#

How would I cancel a task that implements Java Runnable? I've seen Thread.interupt though that stops the whole server

ripe ledge
#

It's just stop working when the if coming

#

idk why

naive goblet
#

@empty salmon Player#openInventory(Bukkit.createNewInventory(null, InventoryType.ANVIL))

kind crow
#

I cancel BlockFromToEvent when putting lava. When I remove the line that cancels that event the lava stays in one block. Is there a way to fix that?

empty salmon
#

@naive goblet It throws Caused by: java.lang.Error: Unresolved compilation problem: 31.05 18:25:26 [Server] INFO The method createNewInventory(null, InventoryType) is undefined for the type Bukkit 31.05 18:25:26 [Server] INFO at me.candinoDev.AnvilGUI.Anvil.onCommand(Anvil.java:21) ~[?:?] 31.05 18:25:26 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-1.14.4.jar:git-Spigot-56f8471-7554e08]

naive goblet
#

What version?

ripe ledge
#

Send your CustomJoinLeave @ripe ledge
@naive goblet

empty salmon
#

1.14

naive goblet
#

Send ur code candino

ripe ledge
#

Can you help me?

empty salmon
#

import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryType;

public class Anvil implements CommandExecutor {

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (label.equalsIgnoreCase("anvil")) {
            if (!(sender instanceof Player)) {
                sender.sendMessage("You don't need an anvil!");
                return true;
            }
            else {
                Player player = (Player) sender;
                Player.openInventory(Bukkit.createNewInventory(null, InventoryType.ANVIL));
                return true;
            }
        }
        
        return false;
    }
}
#

What can I do @naive goblet

ripe ledge
#

I have a problem, this is the error:

[19:23:38 WARN]: [RaptoR-Plugin] Task #65 for RaptoR-Plugin v1.0 generated an exception
java.lang.NullPointerException: permission
        at me.lucko.luckperms.bukkit.inject.permissible.LuckPermsPermissible.hasPermission(LuckPermsPermissible.java:172) ~[?:?]
        at org.bukkit.craftbukkit.v1_15_R1.entity.CraftHumanEntity.hasPermission(CraftHumanEntity.java:221) ~[patched_1.15.2.jar:git-Paper-226]
        at me.YaronD.RaptoR.CustomJoinLeave$1.lambda$0(CustomJoinLeave.java:29) ~[?:?]
        at java.lang.Iterable.forEach(Unknown Source) ~[?:1.8.0_251]
        at me.YaronD.RaptoR.CustomJoinLeave$1.run(CustomJoinLeave.java:23) ~[?:?]
        at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.15.2.jar:git-Paper-226]
        at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:461) ~[patched_1.15.2.jar:git-Paper-226]
        at net.minecraft.server.v1_15_R1.MinecraftServer.b(MinecraftServer.java:1240) ~[patched_1.15.2.jar:git-Paper-226]
        at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:430) ~[patched_1.15.2.jar:git-Paper-226]
        at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1157) ~[patched_1.15.2.jar:git-Paper-226]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:946) ~[patched_1.15.2.jar:git-Paper-226]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_251]

And this is the CustomJoinLeave class: https://pastebin.com/wU8RgGsW
Someone can help me?

naive goblet
#

candino

#

it’s Bukkit.createInventory

#

@ripe ledge seems like the path isn’t set and returning null

#

Or smtng

#

And then when you use it it will cause NPE

#

@kind crow wym

ripe ledge
#

@ripe ledge seems like the path isn’t set and returning null
@naive goblet what path?

naive goblet
#

@wind dock no why?

empty salmon
#

It hasn't done anything @naive goblet

#

No error message and nothing happens in game

ripe ledge
#

what path

naive goblet
#

Player#openInventory(Bukkit.createInventory(null, InventoryType.ANVIL))

#

candino

empty salmon
#

Right, cheers

naive goblet
#

Yaron

ripe ledge
#

what

naive goblet
#

The path is case sensitive

#

some.path can contain another value than some.Path

ripe ledge
#

ohhhh
But the path is the same

naive goblet
#

Staff is uppercase in config and lowercase in code for instance

ripe ledge
#

oh found it

#

lets try this

wind dock
#

Im setting up spleef, and I want to make it so that players can hit each other with snowballs, but cant hit each other with their fist or shovel. How do I do this?

fossil shoal
#

EntityDamageByEntityEvent -> if damager is not snowball, cancel the event

wind dock
#

@fossil shoal srry, I dont really understand what you mean. Where do I find that?

naive goblet
#

EntityDamageByEntityEvent#getDamager()

fossil shoal
bronze marten
#

You coding your spleef plugin or using one?

kind crow
#

Is there a function to update block by location?

bronze marten
#

Location#getBlock()?

#

Then u can do anything u want with that block

wind dock
#

Im not using any plugin :/

#

Well

#

I am using worldguard

#

and worldedit

#

but no actual spleef plugin

kind crow
#

Then u can do anything u want with that block
@bronze marten I don't want to change any properties of the block. I just want to trigger a block update. Is there a function for that. For example loc.getBlock().update()

bronze marten
#

You need to use the BlockState#update(true) method for that

kind crow
#

do I get the blockstate from the getBlock() ?

bronze marten
#

getState()

frigid ember
#

Hey guys, If I make a plugin using 1.8, will p.getItemInHand() work on newer versions of the api?

kind crow
#

ok thanks

soft tusk
#

Do you know a good plugin that can change the nickname in the chat tablist and overhead on the BungeeCord server? the /nick <Name> command, and /unnick

tawny gale
#

Where are the best anticheat for a factions server (300-400 players) ? pls

kind crow
#

is there a command to get current server tps without measuring it manually?

#

Where are the best anticheat for a factions server (300-400 players) ? pls
@tawny gale probably AAC

subtle blade
#

/tps

kind crow
#

/tps
@subtle blade I mean internally, inside an event

subtle blade
#

Oh, a method

#

No

kind crow
#

ok

tawny gale
#

@kind crow NoCheatPlus + Cerberus (if u know) < AAC ? ;p

naive goblet
#

@kind crow You can get tps with nms

sturdy oar
#

yeah

#

MinecraftServer#recentTps[]

#

it's an array of double with length of 3 if i remember correctly

kind crow
#

@kind crow NoCheatPlus + Cerberus (if u know) < AAC ? ;p
@tawny gale not sure. Didn't use Cerberus

#

MinecraftServer#recentTps[]
@sturdy oar how do I get MinecraftServer?

sturdy oar
#

Reflection

kind crow
#

not sure how do I do that. Do you have an example how do I get MinecraftServer from an Event Handler?

keen compass
#

need to depend on the spigot jar itself as opposed to the API

severe hemlock
#

Hey guys I'm using FreeDNS (freedns.afraid.org) to host my minecraft spigot server. Anybody know how to get the port working properly? My server address is my ip, with the port number as 7771. Is there a way to specify it from a dns address using forwarding, or will that not work?

bronze marten
#

Srv record?

keen compass
#

need to create an srv record

severe hemlock
#

how to do that

frigid ember
#

but most acs falses 😔

red zenith
#

You should be able to find plenty of guides about srv records for minecraft with a simple search online

ripe ledge
#

Someone knows why the code found that the player is no staff it's continue too check? (after this saying I am no staff its saying also forEachloop around 5 more times ?
https://pastebin.com/MW5LdPDN

#

read the pastebin first to understand

frigid ember
#

to get the current tps do double tps = recentTPS()[0];

#

@kind crow

kind crow
#

thanks @frigid ember

frigid ember
#

hmm looks similar to atlas

#

np rundik

#

inspired by atlas tbh i like what atlas did

#

just ma own taste yk

#

made wiki for ot

tulip cedar
#

Hello guys, I need help asap. I port forwarded my ip and the server works, but only if I start it from the spigot.jar file. Doing so won't show me the console. If I start the server with a start.bat, the server won't work for other people. PLEASE HELP, I've been trying for 5 hours.

frigid ember
#

and mine supports 1.7.10 -> 1.15.2

#

not only 1.8+

#

the way atlas or protocollib do

#

send your start bat file

#

the text inside it

tulip cedar
#

ok

frigid ember
#

in here

#

what text is inside it

#

send that here

tulip cedar
#

java -jar spigot-1.8.8-R0.1-SNAPSHOT-latest.jar

frigid ember
#

is that the jar name

#

exactly

tulip cedar
#

yes

frigid ember
#

k

#

does the console not appear

tulip cedar
#

The server starts, it works for me, but wont let my friends do so

#

The console appears

frigid ember
#

ur friends cant join?

tulip cedar
#

no, they can't join

frigid ember
#

did u port forward correct

tulip cedar
#

yes

frigid ember
#

sure?

#

whats ur servers port

tulip cedar
#

as it works if i start it from the jar file

#

25565

frigid ember
#

k

tulip cedar
#

it only works from the jar file

#

but that wont let me see the console

#

..

frigid ember
#

ok

#

downlod console ig plugin LoL

tulip cedar
#

what?

frigid ember
#

a plugin to use console in game

subtle blade
#

please don't ever install one of those

frigid ember
#

why lmao

#

the person has no other option

hushed sedge
#

Does vault manage the playtime?

#

because i have no plugin who does that but i can display it with PAPI

ripe ledge
#

How I can create advancements?
Someone have tutorial or something?

frigid ember
#

?paste

worldly heathBOT
frigid ember
#
    this.rank = HypixelSkyblock.getPlugin(HypixelSkyblock.class).getRankManager().getRank((String) map.get("rank"));
#
    this.rankManager = new RankManager(this);
    this.accountManager = new AccountManager(this);
    rankManager.enable();
 
    accountManager.enable();
    customItemManager.enable();
    
#

I enable accounts after ranks

odd knoll
#

What's line 36 of the Account class?

frigid ember
#
    this.rank = HypixelSkyblock.getPlugin(HypixelSkyblock.class).getRankManager().getRank((String) map.get("rank"));
bronze marten
#

cursed

odd knoll
#

Have you checked that map.get("rank") isn't null?

#

Have you debugged to see where it is null?

frigid ember
#

No but I don't think rank can be null

#
    @Override
    public Map<String, Object> serialize() {
    
    Map<String, Object> map = new HashMap<>();
    
    map.put("uuid", uuid.toString());
    map.put("rank", rank.getKey());
    map.put("bal", bal);
    
    return map;
    }

this is where I serialize

#

and this is what config looks like

bronze marten
#

if rank.getKey() is null it will not be in the map

frigid ember
bronze marten
#

but honestly split up the large statement and just debug where it goes null

odd knoll
#

I recommend literally just putting like System.out.println for most values. That's what I do.

tiny dagger
#

wouldn't it be cleaner to use your own serialiser ? 🤔

#

supposed you want your users to go in there

frigid ember
#

It's just for data storage

odd knoll
#

if you use JSON to save, it can also automatically handle a Map if you use Gson 😉

pastel condor
#

Anyone know how I can fix a double clicking issue on my GUI?

tiny dagger
#

roller gson is not that user friendly tho

odd knoll
#

In what way? I've found it fine so far. I very lightly use it tho. Unlike Google to make things not user friendly.

frigid ember
#

It happens occasionally

tiny dagger
#

in the way those who will end up with users bothering you to explain how to add this, why this isn't workin and so on

frigid ember
#

?paste

worldly heathBOT
frigid ember
odd knoll
#

Did you debug what was null?

frigid ember
#
    protected Account(Map<String, Object> map) {
    this.uuid = UUID.fromString((String) map.get("uuid"));
    this.bal = (double) map.get("bal");
    Bukkit.getConsoleSender().sendMessage((String) map.get("rank"));
    this.rank = HypixelSkyblock.getPlugin(HypixelSkyblock.class).getRankManager().getRank((String) map.get("rank"));
    }
odd knoll
#

Ok, literally just debug all the values.

frigid ember
#

None of them are null though

odd knoll
#

Erm. Ok, I'm clueless then.

#

So you checked the rank manager wasn't null? Checked the method call getRank didn't return null?

tiny pebble
#

How could I check to see what is in someone's main hand?

#

I know there is player.getMainHand(), though I'm not quite sure what I'd be setting that equal to to check seeing as it calls for MainHand

fossil shoal
#

player.getInventory().getItemInMainHand()

tiny pebble
#

Ah thank you!

pastel condor
#

for some reason when a player clicks in my gui, it clicks twice
for example if they click open settings gui, then it opens the settings gui and clicks an option in the settings gui

frigid ember
#

I think rankManager is returning null

#

@odd knoll this keeps returning null

    Bukkit.getConsoleSender().sendMessage(main.getRankManager().toString());
odd knoll
#

So your rank manager is probably null.

#

Or main

frigid ember
#

Wait actually I think it's because I regisered Serialization it before I registered ranks

odd knoll
#

Yh.

#

That'd make sense

pastel fox
#

Is Location hash map safe?

#

I.e. if I do Block#getLocation in several places, am I guaranteed the same location instance?

frigid ember
#

@odd knoll it's still not working

    this.rankManager = new RankManager(this);
    this.accountManager = new AccountManager(this);
    rankManager.enable();
 
        ConfigurationSerialization.registerClass(Account.class);

    accountManager.enable();

rank manager is not null when I use it other places in my project, only in that one spot

#

?paste

worldly heathBOT
odd knoll
#

Make sure you actually assigned it.

frigid ember
odd knoll
#

I can't rly look RN, I need to do a lot of work.

tiny pebble
#

Upon using CustomModelData, can I just make a json based around the item I want to have CustomModelData and then assign that integer, or will I have to use a texture pack? Basically I'm just confused about file formatting

#

sorry if that doesn't make sense

frigid ember
#

Hey guys, what's the gravity constant for players in 1.8

sturdy oar
#

Is there any guide for Spigot resources category?

#

I can't really figure out which category i should choose to publish my plugin in

pastel condor
#

Just put fun

hallow surge
#

hello "rollermachine

sturdy oar
#

well It's a bible plugin

#

I think chat

#

but also tools and utilities

tiny dagger
#

yes

#

chat

sturdy oar
#

ok

tiny dagger
#

no

#

tho if i think about it i would use a bible irl as a tool

#

🤔

sturdy oar
#

'Misc'

pastel condor
#

Or guide

#

Idk

#

(Copy pasted question from earlier) for some reason when a player clicks in my gui, it clicks twice
for example if they click open settings gui, then it opens the settings gui and clicks an option in the settings gui

#

And I am not registering the listener twice btw

frigid ember
#

Hey guys, what's the gravity of an armorstand

#

Yeah like entities have a gravity constant, I just cant find it

tiny pebble
#

For having a commands be like:

/c test
/c test1
/c test2

Instead of

/test
/test1
/test2

Wouldn't I do this?

public boolean onCommand(CommandSender commandSender, Command command, String label, String[] args) {
  if (commandSender instanceof Player) {
      String[] test = {"test"};
      Player player = (Player) commandSender;

      if (args == test) {
        // command stuff here
      }
   }
}
odd knoll
#

Args is an array.

tiny pebble
#

(someone told me to use the args variable of it)

#

that's why i used that ^

odd knoll
#

You'd need to:

  1. check the length of the array to make sure there actually are arguments.
  2. Get the position you want for the array and see if it matches test, test1, etc..
tiny pebble
#

I knew it was an array which is why I was initially confused but I went with it and tried it out.

#

mm okay

odd knoll
#

Yh, all good. If you have an array of something, it's a bunch of something. So that's why it's String[] and not String.

#

Also, bear in mind the positions in arrays start at 0.

tiny pebble
#

Mhm. And yeah ik, thanks haha I get confused with Lua sometimes since it's different there

frigid ember
#

Does the legacy version of WorldBorder work with /wb fill?

odd knoll
#

WDYM?

frigid ember
#

does it have that feature

odd knoll
#

I use ChunkMaster for 1.13+ and WorldBorder for 1.8 -> 1.12.2

frigid ember
#

So if I am using 1.8.8 should I get both of them or one

silver pewter
#

Hello, I'm making a custom jar I was wondering where can I add a console output when the jar is loading thanks

bronze marten
#

Wat

austere dome
#

Someone told me a player in Creative mode may spawn in items with PersistentDataContainer stuff inside as well, is this the case? If so this could potentially bypass some stuff from a plugin I was working on.

#

or to be more specific: Is it a dumb idea to serialize lambdas into PersistentDataContainers

frigid ember
#

when is player abilities ever received or when does the client send it?

#

hacked client,

#

?

#

when a hacked client sends it

#

when does the client send it

#

what must he do

#

no idea; but it contains flags, walk and fly speed

#

ik

#

Hey guys, whats the command to get the skull owner of a head? Or to see all the nbt tags and values

#

when is it sent is the question

#

I did some debugging and never received it

#

changed gamemode and tried a lot

#

I'm trying to get the skull owner or skin so I can get this head

#

Skull

#

If I am on 1.8.8 viaversion do i need 2 world border plugins or just the one for 1.8.8

torn robin
#

@frigid ember wym by 1.8.8 viaver

#

what server version are you

frigid ember
#

yo do y'all know if you can add color to Essentials /list?
For example group default
Default: &7default
I tried that, but it didn't work ^

vernal plank
#

Is PlayerItemDamageEvent triggered for armor items as well?

frigid ember
#

@torn robin i am on 1.8.8

#

sry im just a noob :P

torn robin
#

you should be fine, 1.8.8 doesn't have horrendous world loading

#

if you still want the plugin you should get the 1.8.8 version

#

@vernal plank easiest way is to test it

#

@frigid ember yes you can, I think it's in the localization file

#

if not it's probably somewhere in the config

frigid ember
sturdy oar
#

you'll probably find it on the minecraft heads database

#

its a cool websit

iron nebula
#

Why is so many people ripping off Hypixel stuff

#

lmao

frigid ember
#

Because there is a high demand

#

@sturdy oar I've looked buy I can't seem to find it

iron nebula
#

High demand for what?

sturdy oar
#

then it's custom and they made it

torn robin
#

No yeah I totally agree copying stuff from other servers is really dumb imo

#

Let them have their thing, come up with your own ideas

frigid ember
#

@iron nebula I made it for fun then stopped, but then 25 people asked me to continue

iron nebula
#

For what?

frigid ember
#

The plugins

#

wdym

iron nebula
#

Do people want Hypixel skyblock copy that badly?

#

I mean, server owners for sure want to copy all the good ideas but what about the players

torn robin
#

It's an original idea that they worked on. I think it's really... poor character... to copy the same ideas.

iron nebula
#

I don't mind people copying and reusing ideas

#

But what I don't get is that everyone 1-1 copies the server

torn robin
#

less reusing more just copying

#

and it's the 1:1 part definitely

frigid ember
#

@iron nebula they want the same concepts but they want to customize it

iron nebula
#

The server owners, or the players?

tribal wharf
#

Hey, anyone knows how to change the direction/rotation for a banner?

frigid ember
#

The server owners

iron nebula
#

Rite

frigid ember
#

And technically, Hypixel didn't make the idea of skyblock if you want to talk about originality

iron nebula
#

I hope you are at least getting paid

frigid ember
#

Yeah $250 alraedy

iron nebula
#

I'm not speaking about skyblock

#

Okay then thats good ig

frigid ember
#

Yeah it was for an old version but people want me to continue

iron nebula
#

As long as u get paid to rip off someones work its fine to me LMAO

frigid ember
#

Skyblock wasn't hypixels idea

iron nebula
#

Thats not what I'm saying

frigid ember
#

They ripped off the idea from other servers

iron nebula
#

Which idea?

#

The whole server?

#

I'm speaking about 1-1 copies, not copying some fairy souls

frigid ember
#

Why does it matter what I'm making, I'm just asking for the skull of a head

iron nebula
#

Who said it matters?

frigid ember
#

You did

iron nebula
#

Where?

frigid ember
iron nebula
#

It was my opinion

frigid ember
#

Yeah look, I'm dropping it

iron nebula
#

Don't take it personally. I was just wondering bcs I have seen many people do the same and I have no idea where the demand is other than server owners being greedy

#

People have tried to abuse my plugins to copy Hypixel stuff

#

I just help them with the plugin stuff, could care about the other 🤷‍♂️

frigid ember
#

I have no idea, but all I kjnow is that people want it

sturdy oar
#

download more ram

tiny pebble
#

Is there a ChestInventory or something similar rather than DoubleChestInventory?

#

Or if there is another method as to make a command that opens up an inventory. I'm trying to make a menu of some sort, just want it to open the chest inventory and have the items I specify in there. Am I correct in assuming that I want to use InventoryView and then link that to an Inventory of some sort?

naive goblet
#

Yeah well if you want to make gui menus, consider encapsulate an inventory and reference compare it in events.

#

But using InventoryViews is not a bad practice and Bukkit#createInventory has a lot of implementations

wispy kettle
#

How do I make a spigot server that other players can join?

tiny pebble
#

@naive goblet Thanks, I'll look into Bukkit#createInventory. I am also new to Java so terminology isn't all that easy for me to understand haha

@wispy kettle You can search a tutorial online, there's plenty!

pastel condor
#

Can bukkit.saveWorld be run asynchronously?

subtle blade
#

afaik, worlds are saved asynchronously already

#

Unless I'm mistaken and that's a 1.16 thing. I know they added a server option, I just don't recall which was the default

#

parallel-world-save or something

#

(again, this being a 1.16 option)

pastel condor
#

My issue is I’m using swm and my worlds don’t auto save

#

So if I happen to get annoyed and ctrl + c my server, worlds get damaged

#

And sometimes I have to go into a backup and use an older world file

#

So I was trying to make my own auto save method

#

So I should schedule a sync repeating task?

tiny pebble
#

So I just decided to take my IDE recommendations and I got no errors so...

player.teleport((Location) Objects.requireNonNull(player.getServer().getWorld("world")));

Would this work in teleporting a player to another dimension?

#

I don't expect it to, but if it does I don't have to keep working on that 😉

#

Ignore that! Figured out a way. It's quite similar so that would work with one little fix ^

chrome lark
#

saving blocks the main thread while it's throwing stuff off

#

part of the thing you've gotta remember is the contract of a save method, it's gotta ensure that the data is actually saved

frigid ember
#

Paying someone who knows how to setup soyoustart and my pterodactyl panel @me if you are interested

pastel condor
#

?services

worldly heathBOT
gaunt thorn
#

Hey guys, trying to get a player head to have the UUID of the person who runs the /skull command. No errors in the console but I'm only getting steve head not my skin ahaa

#
        
        if (sender instanceof Player) {
            if (cmd.getName().equalsIgnoreCase("skull")) {
                Player player = (Player) sender;
                OfflinePlayer id = Bukkit.getOfflinePlayer(player.getUniqueId());
                
                ItemStack skull = new ItemStack(Material.PLAYER_HEAD);
                SkullMeta meta = (SkullMeta) skull.getItemMeta();
                meta.setOwningPlayer(id);
                
                player.getInventory().addItem(skull);
            }
        }
        
        return false;
    }```
#

What exactly am I doing wrong?

chrome lark
#

ItemMeta is a snapshot, you need to apply it back to the itemstack

frigid ember
#

Hey guys, is there a gravitational constant for armorstands?
I've got this

    public static Vector calculateVelocity(Vector from, Vector to, int heightGain) {
    double gravity = 1;

    int endGain = to.getBlockY() - from.getBlockY();
    double horizDist = Math.sqrt(distanceSquared(from, to));

    int gain = heightGain;
    double maxGain = gain > (endGain + gain) ? gain : (endGain + gain);

    double a = -horizDist * horizDist / (4 * maxGain);
    double b = horizDist;
    double c = -endGain;
    double slope = -b / (2 * a) - Math.sqrt(b * b - 4 * a * c) / (2 * a);

    double vy = Math.sqrt(maxGain * gravity);

    double vh = vy / slope;

    int dx = to.getBlockX() - from.getBlockX();
    int dz = to.getBlockZ() - from.getBlockZ();
    double mag = Math.sqrt(dx * dx + dz * dz);
    double dirx = dx / mag;
    double dirz = dz / mag;

    double vx = vh * dirx;
    double vz = vh * dirz;
    return new Vector(vx, vy, vz);
    }
    

But I can't find out the constant for armorstands

#

It works when the distance of between from and to is close, but not when its far away

#

And it's not very accurate

gaunt thorn
#

ItemMeta is a snapshot, you need to apply it back to the itemstack
@chrome lark I'm a dumbass and just realized this ahaha thank you so much

tiny pebble
#

how would I place blocks under someone?
Basically I'm doing a command that switches their dimension and if they just so happen to spawn mid-air I want some obsidian to pop up under them so they don't get obliviated

subtle blade
#

get their location and subtract 1

#

Get block, set type

tiny pebble
#

Thanks 🙂

frigid ember
#

Hey guys, how can I delete a resource on my spigot page?

chrome lark
#

report it and ask staff to remove it

sweet hemlock
#

Hihi, does anyone know how to send block break particles to all users in range? Or, does anyone know how to make plugin broken blocks break with particles? I've tried what the documentation says, but it's not working.
I've done:

Block b = some block; World w = b.getWorld();
b.breakNaturally(); // <- does not produce any particles
w.playEffect(b.getLocation(), Effect.STEP_SOUND, b.getType()); // <- no sound or particles
w.spawnParticle(Particle.BLOCK_CRACK, b.getLocation(), 20, b.getBlockData()); // <- likewise

and the code doesn't produce any particles. I've searched around but to no avail; do I need to go with sending players packets?

plush river
ripe ledge
#

How I can create advancement?

sweet hemlock
#

Shoot, about my issue:
I realized b.breakNaturally() will turn the following b.getBlockData() to the BlockData of air block.
Big derp moment

#

This solved it for me

Block b = some block; World w = b.getWorld();
w.playEffect(b.getLocation(), Effect.STEP_SOUND, b.getType()); // b.getType() is no longer Material.AIR
b.breakNaturally(); // <- had to move this down
frigid ember
#

what license is the spigot code/patches under?

worn temple
#

GPLv3 iirc. May be wrong, but you can find the license on their repos.

frigid ember
#

is there worldborder for 1.8.9?

worn temple
#

Probably. But you're on your own. We don't support 1.8.x here

fast yarrow
#

@frigid ember yes

frigid ember
#

wait why

#

i dont understand

#

Probably. But you're on your own. We don't support 1.8.x here
@worn temple WHY

#

oops caps

worn temple
#

It's 5 years old. Simple as that. There's not a single reason to use it over other, newer versions

frigid ember
#

pvp

#

thats why hypixel uses it

fast yarrow
#

OldCombatMechanics

frigid ember
#

nope i used that

#

no same blocking mechanics

#

with the sword

fast yarrow
#

you can disable it

frigid ember
#

?

#

you cant block with a sword with that plugin

#

only shield

#

if u enable

worn temple
#

Either way, you're on your own. Neither this server nor the forums support 1.8.x

frigid ember
#

no suffient reason though

sturdy oar
#

Lol

frigid ember
#

1.9 is old too

fast yarrow
#

^

frigid ember
#

yes it shouldnt be supported

sturdy oar
#

I only support 1.13+ to be honest

frigid ember
#

yeah

#

well 1.12+ imo

worn temple
#

I only made a compatibly plugin for the hell of it to test my own skill and problem solving. Not actually meant to be used on anything older than 1.13. but don't really need a reason other than it's over 5 years old and the spigot team officially announced end of life for support on it ages ago.

frigid ember
#

why does hypixel and many popular servers use 1.8.9 though

#

i dont understand

worn temple
#

They don't even use a known fork of spigot.

frigid ember
#

yeah they use 1.8.9 though

#

even if its outdated

sturdy oar
#

1.8.9 is client only just so u know

fast yarrow
#

all of their server is custom so there is no way of saying if its 1.8 or not

frigid ember
#

?

#

its in the 1.8.9 client version yeah

fast yarrow
#

it could be a 1.15 server with a back compat plugin

frigid ember
#

?

sturdy oar
#

Yeah they have a lot of skilled developers

#

They can do pretty much what they want

frigid ember
#

why not make it 1.15 client version

fast yarrow
#

They also get paid a LOAD to dev

worn temple
#

Cuz of people like you who think using the 1.8.x client is worth it. Literally just for that. You can join hypixel with 1.8-1.15.x.

frigid ember
#

yeah and it has no 1.15 features

#

just make it 1.15

#

people will play

#

also

#

will 1.15 plugins work in 1.16?

sturdy oar
#

Depends

worn temple
#

This gets asked on every version change. Depends on what the plugin does and what it touches

sturdy oar
#

if they use NMS or Reflection they may require an update

worn temple
#

My auto broudcaster from 1.7 still works on 1.15 without changing cuz it just sends messages and does nothing else. I don't use the plugin. But it works.

sturdy oar
#

Well my plugin' as well only uses chats

frigid ember
#

interesting

sturdy oar
#

But it breaks

#

Because older versions didn't shade SQL drivers

worn temple
#

There's so many things that change and that plugins can do so it's entirely dependent on the plugin

#

Anyway. I need some fucking sleep. Gotta finish up a modpack tomorrow.

frigid ember
#

just want to be sure

sturdy oar
#

Ehm i think

timid valley
#

cubecraft said the other day its actually eaier for them to add protocol support and reimplement gameplay mechanics than it is to update their code to the newest version and deal with mojangs breakages.

And after doing these updates myself having to handle the server side updates for everyone too... man I agree. I wish I had stayed on 1.12 and just implemented protocol/newer blocks

sturdy oar
#

Yeah main reason is a lot of servers probably can't handle 1.15.2 performance

#

Expecially because they are small servers designed for minigames

ashen stirrup
#

Could anyone help me with coding a permissions plugins, I can’t find any well explained tutorials.

naive goblet
#

Look into sources like luckperms

ashen stirrup
#

Cheers

naive goblet
#

This should give you the basics of how it works. But in my opinion the system is kind of over complicated

sturdy oar
#

Anyone knows when did Spigot\Bukkit started to shade GSON library into the final JAR? I have developed my plugin for 1.15 however it seems much like in 1.8 the GSON is not available at runtime

kind crow
#

How do I prevent a server from loading too many chunks when a player moves too fast?

sturdy oar
#

I mean you can use ChunkLoadEvent

#

oh nvm

#

i guess you can limit their speed?

kind crow
#

It's already limited. I don't want to slow down elytras more than I already did

#

Otherwise the rockets don't work

wind dock
#

can bungeecord connect servers of different versions?

#

for example, my hub is 1.8.8

#

but my server is 1.15.2

#

they just need to be on 1.15.2 to join, since the hub has via version

iron nebula
#

No, its impossible

dreamy glacier
#

little question, i would use (CraftArmorStand) in 1.15.2 , that still exist ?

sturdy oar
#

bungeecord is 1.8 - 1.15.2

#

you can do that @wind dock

wind dock
#

oh

#

thanks

sturdy oar
#

but you'll need protocol translator plugins

frigid ember
#

little question, i would use (CraftArmorStand) in 1.15.2 , that still exist ?
@dreamy glacier it should

#

try it out

sturdy oar
#

I remeber having hub in 1.8.8 and game servers with other versions

#

so u can def. do it

dreamy glacier
#

cause he doesn't propose it to me when I write. ((CraftArmorStand))

indigo cipher
#

any forum staff able to change my age on my account on the forums? I made this account ages ago and so I put in a fake age, I can tell you my real DOB via DM on request

tiny dagger
#

pm a mod on spigot not here

#

but i was sure you could change your age

indigo cipher
#

okay

frigid ember
#

in packetplayinabilities
what is a & d, im seeing conflicting stuff; one person put a as creative and d as instantbuild
another put a as creative and d as invulnerable

sturdy oar
#

there is really no official documentation for NMS fields

#

so either you're lucky and find someone that knows it, or you do the reverse-engineering

frigid ember
#

a is isVulnetable

#

b is isFlying

#

c is allowflight

#

those three are boolenas

#

instantbuild is d

#

also a bool

#

e is flyspeed

#

f is walkspeed

naive goblet
#

Nms pro

frigid ember
#

e and f are floats

#

a b c d are booleans

ripe ledge
#

How I can check if player have a permission, but it will not work on OP until they will add them the permission? (because right now OP have all the permission)

frigid ember
#

ok fatal?

naive goblet
#

Player#hasPermission and !Player#isOp

frigid ember
#

ops by default have all permissions

#

yea

naive goblet
#

That would be the general case

sturdy oar
frigid ember
#

what i said is correct

ripe ledge
#

Player#hasPermission and !Player#isOp
@naive goblet But I want this will work on OP only if they have the permission (Give the permission to themselves)

frigid ember
#

i remember before inchecked nms src it was quite clear

naive goblet
#

Then do the check ?

frigid ember
#

i made a wrapper for abilities thats why i remember these field names

#

i write wrappers 🎤

ripe ledge
#

Then do the check ?
@naive goblet What?

frigid ember
sturdy oar
#

'd' -> godmode,
'c' -> can fly,
'b' -> is flying,
'a' -> is Creative

naive goblet
#
if (player.hasPermission(“perm”) && !player.isOp()) {}```
frigid ember
#

i checked on nms 1.8

#

those are the same names 1.8 had

#

or as similar as possible

sturdy oar
#

I've looked at 1.15.2

naive goblet
#

Or you want to check if they have the permission assigned but they’re op?

sturdy oar
frigid ember
#

b - isFlying

#

i promise

#

i checked

#

theybeven have a method

#

named isFlying

#

and returns b value

ripe ledge
#

Or you want to check if they have the permission assigned but they’re op?
@naive goblet Yeah
I am to check if the player have the permission, and dont allow op but if the op player give themselves the permission it's ok

frigid ember
#

in all versions

sturdy oar
#

yeye they're correct. There's nothing more to say

frigid ember
#

check your nms

#

ok

sturdy oar
#

I mean he could've checked by himself , but whatever

frigid ember
#

theyre actually the same for all versions

#

1.7.10-1.15.2

#

so its not hard

naive goblet
#

You will probably have to get the permission and get set it to default not op

frigid ember
#

yeah

sturdy oar
#

yeah that packet has never changed, you can just look at it from Wiki.vg changelists

frigid ember
#

the field names do

#

and the whole layout

#

did u see 1.7.10 block place and dig

#

very hard to support 1.7

sturdy oar
#

who the hell does use 1.7.10

#

get away

frigid ember
#

it changes 1.7.10, 1.8-1.12, 1.13+

ripe ledge
#

You will probably have to get the permission and get set it to default not op
@naive goblet What?
How?

naive goblet
#

Eventually 1.7.10 shouldn’t be used under any circumstances

frigid ember
#

1.8 has it different to 1.13+ too

sturdy oar
#

i'll check

frigid ember
#

or 1.8.8

#

1.7 literally had fields for the position

#

like a b c

#

in newer they made a base blockposition class

#

if you are attempting to support more versions and not just one version, its very hard to access such classes, its a lot of reflection.

#

if bukkit didnt get stuck i wouldnt have to use packets, isFlying, isSneaking, isBlocking all break

#

field names im the base blockposition class changed too

sturdy oar
#

they never changed from 1.8 to 1.15.2 @frigid ember

frigid ember
#

and in the packet itself for the position changed the field name

sturdy oar
#

I've just checked with the decompiler

#

they are literally the same

naive goblet
#

@ripe ledge well what’s the use case of that though?

frigid ember
#

changed what?

sturdy oar
#

the internal values names

frigid ember
#

variable names?

#

ofc they did

#

check properly

sturdy oar
frigid ember
#

^

#

im not speaking about abilities

#

i said block dig n place

sturdy oar
#

oh ok

frigid ember
#

yea

#

why write it upside down

sturdy oar
#

FatalPacket why do you have Dawson's gif as pfp lmao

frigid ember
#

one reads from up to down lmao i misread it

#

¯_(ツ)_/¯

#

i thought top was a

sturdy oar
#

I was in that live lmao

frigid ember
#

ect

#

me too

#

server thinks you're still blocking

sturdy oar
#

I'm not that good with anticheats

#

I've never considered making one

frigid ember
#

😔

#

since wikepedia annoys me so much with that dono message i donated

#

like ffs 😂

#

then they ask me should we send more emails 😑

#

chargeback

#

nah ill get banned

#

nvm i dont even have an account

#

how dumb am i

#

why did i dono

#

who cares

#

they need it cos por

wind dock
#

do you guys have any plugin recommendations for factions?

ripe ledge
#

@ripe ledge well what’s the use case of that though?
@naive goblet What?

spring cradle
#

I got a server using OMGServ and i created a world using the admin panel. This world is in the panel worlds list but it's apparently not enabled on the server.
Because i created a command /worlds giving server's worlds list and the world a created is not in the list.
Do you know how i can fix it ?

whole sigil
#

Does someone know a good rankingKill plugin with elo ranking up and stuff like that ?

wanton delta
#

is it possible to set the view distance per-world?

#

i saw the method world.setmetadata but im unsure of what that does, there arent any other methods that signal that functionality

#

i found this

#

((CraftWorld) world).getHandle().spigotConfig.viewDistance = 3; does anyone know if that will override what is in server.properties?

trail oracle
#

Do you use pebblehost

#

Filezilla?

#

With notepad ++

wanton delta
#

seems as if that way of doing it isnt that great

sturdy oar
#

Filezilla is ew

main holly
#

Help

#

have a problem and it is that it appears to me "your country is prohibited on this server

#

at the time I want to enter my server

wanton delta
#

did someone ping me

main holly
#

Help 😔

wanton delta
#

do you have authme

sturdy oar
#

inb4 has authme

wanton delta
#

(he does)

sturdy oar
#

inb4 has offline mode server

main holly
#

Yes

wanton delta
#

your authme config has a prohibited countries option

sturdy oar
#

:ree:

main holly
#

how do I deactivate it?

wanton delta
#

google

main holly
#

Thanks 👌

ashen stirrup
#

I don't know much about NameSpacedKeys, would this work?

String[] enchants = ench.split(":");

Enchantment enchantment = Enchantment.getByKey(new NamespacedKey(MineTropicalSupplyDrop.getPlugin(MineTropicalSupplyDrop.class), enchants[0]));
Integer level = Integer.valueOf(enchants[1]);

Where the enchants array contains DURABILITY as 0 and 3 as 1

wanton delta
#

what are you trying to do

dusty topaz
#

Pretty sure getByKey goes off of the minecraft:whatever names

#

Not the class static names

ashen stirrup
#

Oh really

#

So enchantment = Enchantment.getByKey(NamespacedKey.minecraft(enchants[0])); would work

naive goblet
#

Have you tried yet?

ashen stirrup
#

Mhm, NamespacedKey seems to be added on a version higher than 1.8 so I just used:

if (Bukkit.getServer().getVersion().contains("1.8")){
    enchantment = Enchantment.getByName(enchants[0]);
} else {
    enchantment = Enchantment.getByKey(NamespacedKey.minecraft(enchants[0]));
}
#

Enchantments still don't seem to be added to the item

naive goblet
#

not returning null?

ashen stirrup
#

I've done some debugging before, printing the values etc.
enchants[0] outputs DURABILITY
enchants[1] outputs 2

timid valley
#

are you putting this on item meta

ashen stirrup
#

ItemStack

naive goblet
#

Wait you have config values like :

  enchants:
    - 'DAMAGE:1'
```?
ashen stirrup
#
  '3':
    item: "DIAMOND_SWORD"
    amount: 1
    enchants:
      - "DAMAGE_ALL:2"
#
  '3':
    item: "DIAMOND_SWORD"
    amount: 1
    enchants:
      - "DURABILITY:2"
#

etc.

#

Any ideas?

#

Fixed it

#

meta.addEnchant(enchantment, level, true);

naive goblet
#

You could add a method in your utility class btw

//Utility
public static Enchantment getEnchantment(String name) {
  return Bukkit.getServer().getVersion().contains("1.8")) 
    ? Enchantment.getByName(name)
    : Enchantment.getByKey(NamespacedKey.minecraft(name));
  
}```
#

okay I wrote a bible but nice that you fixed it :p

ashen stirrup
#

Pahaha, sorry

fickle surge
#

kit plugin 1.15.2?

pallid turret
#

Right now I'm trying to make a win task and in it only the person who is first in the alphabet will win, can anyone help me? Here's my code so far:

    @Override
    public void run() {
        if(plugin.getGdHHM().isGameOn.get("skyknock")) {
            int count = ASliveCoubnt.count;
            for(Player player : plugin.getServer().getOnlinePlayers()) {
                boolean alive = plugin.getGdHHM().alive.get(player.getUniqueId());
                if(!alive) count = count - 1;
                if(alive && count <= 1) {
                    //plugin.getServer().broadcastMessage(ChatColor.GREEN + player.getName() + " HAS WON!!!");
                    for(Player players : plugin.getServer().getOnlinePlayers()) {
                        plugin.getGdHHM().alive.put(players.getUniqueId(), true);
                        players.setGameMode(GameMode.SURVIVAL);
                        players.teleport(GDLocations.spawn);
                        players.getInventory().clear();
                    }
                    plugin.getGdHHM().isGameOn.put("skyknock", false);
                }
            }
        }
    }
frigid ember
#

dude

pallid turret
#

Sorry I just entered it at the same time

fickle surge
#

ctrl c ctrl v: am i a joke to u?

frigid ember
#

lol

#

no im mobile

pallid turret
#

I use IntelliJ for Java

frigid ember
#

!??

#

dont answer if u dont know 🤦‍♂️ 😂

#

i was thinking kotlin wouldnt be bad what u guys think

pallid turret
#

You said you wanted an IDE right?

#

Oh

frigid ember
#

!????

pallid turret
#

I haven't used Kotlin

frigid ember
#

you dont know my question even

#

its ok

#

Hello, how to get precedent complete elements on TabComplete event ?

I have tried PlayerChatTabCompleteEvent but it's deprecated and don't work

#

just maybe someone else knows

fossil shoal
#

Skript

frigid ember
#

no thats wrong

#

nothing to do with mc and ew skript

#

efficient scripting engine existing for java*

#

nashorn is inbuilt but bit slow

fossil shoal
#

You're editing the messages as if I haven't already seen them lol

frigid ember
#

ik u saw it

#

may i not edit

#

😂

fossil shoal
#

You can indeed😂

lone rapids
#

====================Trying to save player data using config.yml having some problems
Cannot load plugins/classes/config.yml
org.bukkit.configuration.InvalidConfigurationException: could not determine a constructor for the tag tag:yaml.org,2002:java.util.UUID
in 'string', line 3, column 11:
User: !!java.util.UUID {}

hollow thorn
#

how do i get an entity to point towards another entity

final osprey
#

i have a problem with my server, it may be caused by windows it self but i want to look into it any way
over the past 12 hours my server stopped responding and restarted several times
OS: windows server 2019 standard
IP: tnsu.ddns.net:14004
problem that keeps kicking in:

[14:54:21] [Spigot Watchdog Thread/ERROR]: Server thread dump (Look for plugins here before reporting to Spigot!):
[14:54:21] [Spigot Watchdog Thread/ERROR]: ------------------------------
[14:54:21] [Spigot Watchdog Thread/ERROR]: Current Thread: Server thread
[14:54:21] [Spigot Watchdog Thread/ERROR]:      PID: 17 | Suspended: false | Native: true | State: RUNNABLE
[14:54:21] [Spigot Watchdog Thread/ERROR]:      Stack:
[14:54:21] [Spigot Watchdog Thread/ERROR]:              java.io.WinNTFileSystem.delete0(Native Method)
[14:54:21] [Spigot Watchdog Thread/ERROR]:              java.io.WinNTFileSystem.delete(Unknown Source)
[14:54:21] [Spigot Watchdog Thread/ERROR]:              java.io.File.delete(Unknown Source)
[14:54:21] [Spigot Watchdog Thread/ERROR]:              net.minecraft.server.v1_15_R1.WorldNBTStorage.saveWorldData(WorldNBTStorage.java:62)
[14:54:21] [Spigot Watchdog Thread/ERROR]:              net.minecraft.server.v1_15_R1.WorldServer.save(WorldServer.java:820)
[14:54:21] [Spigot Watchdog Thread/ERROR]:              net.minecraft.server.v1_15_R1.MinecraftServer.saveChunks(MinecraftServer.java:655)
[14:54:21] [Spigot Watchdog Thread/ERROR]:              net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1004)
[14:54:21] [Spigot Watchdog Thread/ERROR]:              net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:824)
[14:54:21] [Spigot Watchdog Thread/ERROR]:              java.lang.Thread.run(Unknown Source)
#

that just happens randomly

#

now i am a first year system administrator so dont be afraid to go technical on my ass

#

just stops before finishing the thread dump

#

note the server is inside a active directory domain

#

not a domain controller as my CPU is too old to handle this
as well as the network load was too high

frigid ember
#

Hello, how to get precedent complete elements on TabComplete event ?

I have tried PlayerChatTabCompleteEvent but it's deprecated and don't work

main holly
#

What essentials permission is to be able to tp me to the warp?

opal marsh
#

looks like essentials.warps.[warpname] or essentials.warps.*

main holly
#

Thanks

final osprey
#

tank

#

doesnt answer my question lol

white kite
#

Hello, How I can get the name of an inventory without Event ?
I do this but since somes versions the 'getTittle()' method exist only on InventoryView
https://hastebin.com/qobahalace.cs

opal marsh
#

the Inventory object itself doesn't store a name

white kite
#

What is the best choice to get the name ?

opal marsh
#

you can think of an Inventory as just the contents and the InventoryView as a display of the contents (which includes the name)

#

what are you trying to do?

white kite
#

Save an Inventory with the name. (this a 2nd inventory for the player)

opal marsh
#

where does it get the name from?

white kite
#

Bukkit.createInventory

opal marsh
#

that can get you the InventoryView that's currently open without events

#

from there, you can grab the name

white kite
#

Yes but for save, I can't use Event

opal marsh
#

you don't need to use an event

#

I'm assuming you're running this as an executor to a command?

white kite
#

I save The inventory each time the server restart
So I just have an Inventoty

frigid ember
opal marsh
#

@frigid ember I haven't used it personally and I have no idea how it performs in benchmarks but you might want to look into lua

sturdy oar
#

I do use Kotlin

frigid ember
#

as a scripting engine for java

#

the way nashorn is

sturdy oar
#

Nashorn is for javascript

frigid ember
#

nashorn is a javascript engine in java

#

inbuilt

sturdy oar
#

yes

frigid ember
#

in java

opal marsh
#

...yeah

#

?

sturdy oar
#

Kotlin is an entire different thing

frigid ember
#

i know

#

apparently jetbrains made it possible to be used as a scripting engine too

sturdy oar
#

I think so, you can use .kts files

frigid ember
#

does anyone know any more efficient ones than nashorn itself

#

before i test kotlin by jetbrains tomorrow

sturdy oar
#

Skript 🤣

frigid ember
#

did i ever mention minecraft 🤦‍♂️

#

why does everyone say skript man

#

its 💩

sturdy oar
#

because it's a meme

frigid ember
#

if u dont kno dont say, so many people said skript it’s annoying now

#

java

#

anyone know a fast scripting engine or method to embedd another language that can compile and is fast

final osprey
#

mincraft is built on java

opal marsh
#

when you say "that can compile", that kinda defeats the purpose of a scripting language, yeah?

final osprey
#

mhm

#

if you want something that compiles

opal marsh
#

if you want compilation, don't use a runtime execution

frigid ember
#

nashorn can compile

final osprey
#

use C++ or C#

frigid ember
#

and is still considered part of the scripting api

final osprey
#

or python

frigid ember
#

im java

final osprey
#

well then shut up

frigid ember
#

jython api for scripting is real large

#

really large, I didn’t see much performance difference to nashorn.

final osprey
#

then what is your problem?

#

if it works dont complain for god sake

frigid ember
#

why you so rude

#

compile converter Skript -> Java 🤣

#

having a “atleast it works” mindset isn’t the best in most cases

#

You can optimize code yk..

final osprey
#

pffft

opal marsh
frigid ember
#

just askin if sth yk bit faster than nashorn that someome added

final osprey
#

you wont survive a day in a world of system administration

frigid ember
#

techdoodle thanks for helping tho

#

CompiledScript removes some overhead and if you run it over and over again, so it will be faster. The call can happen inside the script especially in case of recursive functions. It is not a immutability guarantee, but like a constant - if you need changes in the script you need to recompile. +more you can just call "cscript.eval();" as well, however if you want to use different aka mutable parameters then, yes. It would not make sense to recompile each time as it has larger overhead.

opal marsh
#

@white kite I'm not sure what Bukkit.createInventory is doing to save the title but at a glance, there doesn't appear to be a way to get the title from the returned Inventory object

frigid ember
#

techdoodle ^^

white kite
#

How I can get the tittle ? NMS / store on variable ?

opal marsh
#

@white kite yeah, storing it with the inventory in a map or an object would probably work but it's hard to say it'd be best without more details on what you're doing

frigid ember
#

fatalpacket yk other ones

opal marsh
#

@frigid ember it's just saving the overhead of parsing each time

frigid ember
#

nashorn isnt as good anyway

#

its js is very uhh

#

not good

#

like print... why not console.log()

obtuse rose
#

Nashorn isn't that bad tbh

opal marsh
#

console.log is specific to the dom, node just wraps that for api niceness

frigid ember
#

its non-ES 5.1 compliant

#

and es10 is already out

white kite
#

@opal marsh Thanks you

obtuse rose
#

true

frigid ember
#

if nashorn were to follow ES standards, print means print out to printer

#

its a better practice to use console.log

#

I am using jdk 8

#

thats only in jdk 11 according to that article

opal marsh
#

that's when nashorn is being deprecated

frigid ember
#

Why do you think i asked for another scripting engine?

opal marsh
#

idk, you never told us

frigid ember
#

I did

#

specify two reasons

#

lmao

#

i just asked for another one man

#

yk another one compatible with jdk 8?

opal marsh
#

you mentioned reasons you feel one is inadequate but you never told us your use case

#

to suggest another one would be to guess at what you're trying to do

frigid ember
#

I may not tell you the use for my project.

daring crane
#

skript alternative

frigid ember
#

I want something fast, sth I know is faster than nashorn.

#

^

#

I AM not developing any minecraft plugin 🤦‍♂️

opal marsh
#

@frigid ember can you suggest for me a language other than Java? I won't tell you what I'm using it for but I don't like Java

frigid ember
#

and skript is 💩

opal marsh
#

see how ridiculous that sounds?

frigid ember
#

Serious Spigot and BungeeCord Help 🤔

#

Cos there no java help

#

xd

#

i asked for a java scripting engine specifically

#

Skript isn’t one

#

@frigid ember can you suggest for me a language other than Java? I won't tell you what I'm using it for but I don't like Java
@opal marsh when did i say that

hot girder
#

I think

#

Drupi

#

uses JS

frigid ember
#

Now you are just manipulating the situation

hot girder
#

kalm

frigid ember
#

You aren’t helping in anyway.

#

Ok

opal marsh
frigid ember
#

im trying to support other scripting languages for scripts in a project or game

#

won’t give more details

#

??

final osprey
#

@frigid ember go to a dedicated server they can help you better

frigid ember
#

with java

opal marsh
#

I mentioned from the start that lua could be a good option

frigid ember
#

is it efficient tho

#

fast

#

can u link me one

final osprey
#

look at gmod

frigid ember
#

what even is gmod

final osprey
#

facepalms

hot girder
#

check drupi

final osprey
#

how old are you?

hot girder
#

irrelevant

frigid ember
#

u are off topic generaaleric

opal marsh
frigid ember
#

you are talking about something very different

opal marsh
#

that should have what you're looking for

frigid ember
#

yuss add me

final osprey
#

if it even shows up lol

#

it doesnt

frigid ember
#

yushunadd me

opal marsh
#

@final osprey at a glance it seems like some funky filesystem business

hot girder
#

what

final osprey
#

it shouldnt though

opal marsh
#

could possibly be from open file handles?

final osprey
#

no

frigid ember
#

if it even shows up lol
@final osprey “how old are you”

#

“you defo wont last a day in cs class” 😂

final osprey
#

18 years old

#

im a system administrator

#

not a programmer

frigid ember
#

thats why i said it

#

🤦‍♂️

opal marsh
#

@frigid ember if you can't effectively describe a problem, you defo won't last a day outside cs class

final osprey
#

i agree there

#

@opal marsh another problem occurs when i take the domain controllers offline

frigid ember
#

I actually described as much as I needed to if you know about javas scripting engines.

final osprey
#

the domain controllers are virtual machines hosted on my laptop

frigid ember
#

Ok

final osprey
#

the server cannot update his dynamic dns name

opal marsh
#

@final osprey is this on a network drive or being shared with any other machines?

frigid ember
#

but i will look into lua

final osprey
#

no

frigid ember
#

who knows maybe ive been underestimating it

final osprey
#

well yes

#

but that shouldnt interfere right?

frigid ember
#

have you ever used lua in java or did u just recommend me something random

opal marsh
#

that's probably the problem @final osprey

frigid ember
#

what you mean

opal marsh