#help-archived
1 messages · Page 209 of 1
you might be able to create an inventory, then set all the item stacks in the other inventory to the new one
you can do that?
yup
is there an easy way to copy it?
inventory.getContents() returns an item stack array
A unique inventory for every player?
oh
so I want a basic layout for the scroller
but I want the name of the inventory to be the name of the crate the player is opening
mhm...
you might be able to create an inventory, then set all the item stacks in the other inventory to the new one
@pastel condor honestly it's easier just to make a new inventory
and obviously, if everyone was looking into the same inventory it wouldn't work
so my plan was to initialise a prefab
then make a clone of the inventory and pass it to a player when they open it
unfortunately you can't change the name of an inventory after creation
so the plan falls apart
You can't directly change the title (unless nms maybe?) but you can open up an inventory with the exact same contents, just different title
wdym @open ibex
Just make a new Inventory with Bukkit.createInventory with the correct title, put the correct items in, and open it to the correct player while the other inventory is open so it transitions seamlessly
that's not the issue
I don't need the title to change whilst they're in the inventory
I was just trying to make things more efficient by only creating one template inventory , which could then be clones to everyone who opens it
the issue is that the name changes depending on how they opened it
so I can't do that unfortunately
right
honestly it probably won't make much of a difference regardless
it will probably end up being the same after it's compiled anyway xD
Unless reflection can change final fields
I dunno tbh, I haven't really learnt reflection
Well, i think I did at one point...
but then I didn't need to use it and then forgot about it
It's not that difficult
Oh yeah you can change final fields with reflection
The field name is title
huh
will it update it thou?
It might be final for a reason
It's probably fine since I'd be cloning it anyway
but honestly I cba now
Inventory inv = Bukkit.createInventory();
Method getInventoryMethod = Inventory.class.getMethod("getInventory");
Object inv1 = getInventoryMethod.invoke(inv);
titleField = inv1.getClass().getDeclaredField("title");
titleField.setAccessible(true);
titleField.set(inv1, "new title");
Probably a few errors in there but that's the basic idea
o nice
well I'll write it down in case I do decide to change it
it would be interesting to test it out
how do plugins add license keys or add a limit of ips that can use it
or like add a list of ips
etc
Metrics?
I don't know if you can limit the amount of plugin users, but it doesn't seem fair
Most anticheats do this
do plugins use post / get im guessing
to prevent leaking
Oh
ye
it's something i want to learn idk how it's possible
possibly just get / post apis
Each plugin could report to a website which could keep track of the total amount and let new plugins request data from it
ye but lik
but then people can still just decompile plugins and remove it
that part
and then leak it
so how do plugin developers get around that
Don't invest your time in something that will be circumvented easily
oh so licensing is pointless?
oh
sad noises
I released a premium plugin recently, not obfuscated and open source
I encourage the same practice
o
i'm not sad about it, it's just i'm bored bc of summer and dont know what to create or do, i've been asking people for like
ideas
of original minigames, gamemodes, twists of existing ones
Definitely wouldn't advise investing that time into DRM ;P
xD
It's not at all worth your time, I can assure you of that
Can't people just compile the source then
But it's premium
choco is nice
Yes, they can. and I'm still going to offer support to those that do
i forgot there's one other plugin that's-
OH YEAH
redisbungee
old and abandoned
$20 on spigot
but free to compile on github
lol
ah
do any of u got ideas for some original minigame / gamemodes or something based off an existing video game or even a "twist" / different style of an existing one
The way I like to think of my premium resource is that it would have otherwise been free and open source anyways. I don't really care. The premium status is more as a way to reward me if someone chooses to purchase it
ooh
i got an idea
i should make a plugin that adds realistic mechanics into mc but im 100% sure that already exists
but it sounds fun xd
Sounds like a lot of work and something that will be difficult to make in just a plugin
a lot of it sounds complicated but yeah it sounds like it'd be fun
just wiling to do something fun in my free time, dont care if its difficult as long as its fun
That makes sense
There can always be addons for it 👀
@hoary topaz
can you not advertise on my own resource page?
I know you suggested the reload command, but that's not the place to do it
let me do what
I use OSHI to get the info
moldy not cool
is that ur code
no
r u sure
i mean yes that's my code
🙂
LOL
decompiling open source is no good
you know why I am asking
in that project yes
Should've used Java and ACF
xd
my plugin has only 1 command for now and I'm using it 😏
😏
I also use IDB if you're insterested
IDB is cool when you have database implementations
how would i search for a biome? i want to set a plains biome as spawn location when creating a new world
/locatebiome?
i mean in code lol
oh
creating a new arena world, with a border, and want to prevent players to spawn at a dark forest or in a sea
its a normal world
ohh
you could just set the biome
@sinful spire i think it would just change the name
How can I send an action bar with ProtocolLib with a message, fade in time, stay time, and fade out time?
with protocolLib idk
i know with spigot
but actionbars dont have fade-in/out times
they just get updated every second
they do i think
yes they do
wtf
they're in /title and you can set that in title
i found this https://github.com/MegaNarwhal/BiomeFinder/blob/master/src/main/java/us/blockbox/biomefinder/BiomeNearbySearcher.java
/title has a way for actionbars?
yeah
lol nvm
I have some nms code, but I'm not sure how to do it with protocollib
i am using
player.spigot.sendMessage(ChatMessageType.Actionbar, new TextComponent("message"));
i have no clue about ProtocolLib lol
public void sendActionBar(Player player, String message, int fadeIn, int stay, int fadeOut) {
PacketPlayOutTitle titlePacket = new PacketPlayOutTitle(EnumTitleAction.ACTIONBAR, ChatSerializer.a("{\"text\":\"" + message + "\"}"), fadeIn, stay, fadeOut);
((CraftPlayer)player).getHandle().playerConnection.sendPacket(titlePacket);
}```
That's what I currently have, but I'm trying to not use NMS for it and instead use ProtocolLib
well whats the chance, that there is no plains biome between x/z 1 - 10k
i think there will be one always?
oh wow, intellij crashed wtf
thats why u use eclipse
eclipse laggs like shit for me
and intellij is way better if you are not a beginner
in my opinion
i am a beginner so i guess thats fine
Does the PlayerMoveEvent edit position values?
wanted to switch to intellij but its laggy af somehow
eclipse is best for beginners, because intellij is a bit complicated
i think this should work?
private void searchBiome() {
Random random = new Random();
int x = random.nextInt(10000 - 1);
int z = random.nextInt(10000 - 1);
int y = Bukkit.getWorld("world").getHighestBlockYAt(x, z);
Location loc = new Location(Bukkit.getWorld("world"), x, y, z);
if (loc.getBlock().getBiome() != Biome.PLAINS) {
searchBiome();
} else {
Bukkit.getWorld("world").setSpawnLocation(loc);
}
}
how to check if the plugin message that BungeeCord receives is from a particular plugin?
I am using PluginMessageEvent
maybe with a config file idk
with the sending-plugin set a boolean or string in a yml-file, and with the bungee-plugin read it
if bungeecord supports that
@EventHandler
public void onMessage(PluginMessageEvent e) {
DataInputStream in = new DataInputStream(new ByteArrayInputStream(e.getData()));
try {
String subChannel = in.readUTF();
System.out.println(subChannel);
if (subChannel.equalsIgnoreCase("command")) {
String serverName = in.readUTF();
String command = in.readUTF();
if (serverName.equalsIgnoreCase("all")) {
for (Map.Entry<String, ServerInfo> entry : BungeeCord.getInstance().getServers().entrySet()) {
ServerInfo server = entry.getValue();
sendToBukkit(command, server);
}
} else {
ServerInfo server = BungeeCord.getInstance().getServerInfo(serverName);
if (server != null) {
sendToBukkit(command, server);
}
}
}
} catch (IOException ex) {
ex.printStackTrace();
}```
I have this rn
with the sending-plugin set a boolean or string in a yml-file, and with the bungee-plugin read it
@tough kraken
if bungeecord supports that
@tough kraken
idk if bungee supports custom configs
but i think so
well the issue here is, this event is called for every plugin message bungee receives
and in case there is no sub channel provided, it will throw exception as you can expect
although this works when my plugin sends message
but I have seen my bungee console getting spammed when I join the server
on sending of the PluginMessage, use the config and set like
SendingServer: "servername"
in bungee in the event get this string, and check if its the server-name, you are expecting
you didn't get it.
All I am saying the error is here: String subChannel = in.readUTF();
there are messages that do not require another data
so when I do read the data, it will throw exception
.-. do I really need to keep using NMS just for an action bar...
.-. do I really need to keep using NMS just for an action bar...
@stoic shell there are API's
whats so bad on that?
.-. do I really need to keep using NMS just for an action bar...
@stoic shell
nothing, just I would probably have to update it each Minecraft release
well i am using pvp bots
with nms
believe, i know what you mean xd
but maybe protocolLib has a discord?
i dont know about pl, like i said
Sorry guys, do you know in what Class Spigot Updates the values for the PlayerMoveEvent?
alright
I found the way
there is a getTag() method
which basically returns the channel name
The values of a player move event are not changed (unless a plugin were to)
New player move event is dispatcher by the event dispatcher each time
He wants to know where it’s called
I think it’s in the PlayerInteractManager, but really... just do a search for PlayerMoveEvent in BuildTools
Just dump a stacktrace when the playermoveevent is called if you don’t have the source code from builtools or whatever around
can anyone help me here?
I have no idea why it's not working ;-;
this is my main
Line 42 is null
its null
I can see that
but that makes no sense?
how can a function call be null?
the function exists
it told me to make it static ;-;
Cause static abuse, why not
....
how is it static abuse?
the class isn't static
this is me trying to avoid static abuse by actually creating the object D:
o
It doesn't have to be static
apparently I can make it not static
there are some cases where class fields should be static, but that? no
Does anyone know how I'd change the color of a glowing entity (Not a player, but another living entity such as a mob)? I know the glow color for players is associated with the team, but is it even possible to add mobs to teams?
...
Uuids?
@tribal field Usually packets are used for glowing colors
CratePlugin isn't an instance
Ah I see, any Packet in particular? @sturdy oar
lmao nvm
Still fairly new to spigot, but I do have experience with them from Forge :P
I already have a function for getting the instance xD
ok that actually makes a lot of sense and helps, thx
soo is there no EntityMoveEvent?
There's none, yes
Just dump a stacktrace when the playermoveevent is called if you don’t have the source code from builtools or whatever around
@bold anchor you have to. You can’t get the server jar to run your plugins any other way anyways
If you don’t have BuildTools, I’ll be impressed if you’re running a test server
Runnable/Schedulers
is that an answer to my question?
oh
well i still dont get what you mean exactly
am I supposed to poll all entities to check if they're moving?
You have to use a runnable or scheduler and check if they moved individually
lmfao
Performance intensive but that's the only way afaik
is there a reason that event doesnt exist?
there seems to be every other thing that could possibly be thought of
well thats up to plugin devs to optimize
theres a bunch of code happening with every entity move anyways
adding something small wont impact performance
also, forcing people to poll entities is much much much worse than any possible entity move event
not any bigger than the PlayerMoveEvent
🥳
It'll definitely be bigger
There are tens of hundreds of entities for each player online cause of chunks
It'll be ticked almost all the time
yeah, theres code running for each entity anyways
for mobs, all the AI calculations
and adding an event doesnt do anything compared to that
all of that data is there anyways
Will still be worse than the player move event
Those public, non final fields are arguably worse, Cobble 😛
private, final, make some getters
Also, Bukkit > this.getServer()
Instance hasn't yet been initialized at the time of field construction
what is the file named after?
Fields initialized first, onEnable() is called later
heh
the file config is in a seperate class
why wouldn't I make it static?
I only want 1 file configuration right?
if I made multiple savers that would mean multiple config files
It’s meh doesn’t really fit with my principles, just set the field in onEnable instead of on class init
The class can be linked to 1 file
Those public, non final fields are arguably worse, Cobble 😛
@subtle blade so... make them private and final, then make some getters for my other classes to use?
Fields initialized first, onEnable() is called later
@subtle blade so I should initialise them in onEnable?
Yes
Yes, in which case they can't be final
Though they should still be private and have getters
Encapsulation. One of the core principles of OOP
Encapsulation?
If I wanted to, right now, I could have my plugin set your saver to my own Saver instance
In a way, yes
protected means children and classes in the same package may access it
does that mean I need to go and change every public variable I have
Not quite the same as package-private or private
Well, not necessarily. There isn't anything inherently wrong with public. It's just not as common
It’s bascially just a principle we follow cause we do 🤷🏼♂️
I’m sure there is some actual correct theory but whatever
How would I make it so when a message (it gets the message text from the config) is said in chat how do I put a value into it, example, total animals killed?
so I downloaded BungeeCord from https://ci.md-5.net/job/BungeeCord/, but when I try running my start.command I get this error: https://paste.md-5.net/ogolosopuz.css
Don't think I have much Encapsulation on my plugin 🤔
I use kotlin, it handles encapsulation for me
plugin.yml should go outside the me folder
src/resource or something
It should be in the src folder
Well i dont know if it "should" but that is where mine has always been without issue.
Doesn’t look like maven or gradle
I think it's just eclipse being weird
Don’t listen to him it’s in the correct places
You should learn how to use gradle / maven tho. It’s great
Hey @subtle blade. Isn't PlayerLeashEntityEvent supposed to trigger when breaking a lead? From memory i believe it used to. Am i misremembering?
How would I make it so when a message (it gets the message text from the config) is said in chat how do I put a value into it, example, total animals killed?
Im not clear on what you asking doominator.
so you know how there are values that you can change
Papi
like kills to 1 or 10
Are you making a plugin doominator?
You want a command like /totalkills or you mean if someone just says those words in a message?
Or you mean if you every put "#" in a chat message it replaces the "#" with total kills?
i want a message that runs every few minutes that says how many kills a player has and it gets the message text from the config
So every x minutes it will just chat spam a system message that says "Player blah has killed # animals." Something like that?
like in the config it says
message: you have %totalkills%
That's a placeholder, yes
i just need the message part
Okay, narrow that down. What do you mean the message part? There are a few moving parts to this. What part are you missing? how to read a config? How to make it repeat?
just use java string functions like contains
ok thanks!
It does
Oh
replace replaces all occurenses
Java should've written it better
replaceAll is a misleading name yes
I thought it replaced only one occurance not duplicates
replaceAll is for regex, replace is for normal shit
Have you tried kotlin?
no
It’s great
Why c++?
Game development
I see, i would have suggested rust. But don’t think there is a lot of docu/tuts on rust games
I'm a lazy person so the game would take years but that's good enough
Hey! 😄 Ive just bought https://www.spigotmc.org/resources/bountyhunters-premium.72142/ and it hasn't popped up in my Purchased Resources nor can I download it 😦
Dm the author
Give it a bit of time to process. If after 24 hours you're still unable to download, contact the author
It's either that, or it takes a while
If it's more than 24 hours, then it's most likely manual accept
iirc, AWE has it
or atleast a world edit plugin has it
Is there a packet for the animation that happens when a player's item is on cooldown? Like ya know when you right-click a sheep with shears and the arm just goes downwards? Yeah does anyone know how to replicate that
Mh
You mean the interact animation
If you need the clientbound one
It's 0x06
The the second field of that packet should be 0x00 which is arm animation
guys how do i get the permission of having everyone being able to use mail from essentialschat
cuz im using /lp group default permission set esssentials.mail
but its not working
Those with world guard, does anyone know how i can rename my region?
I mean, you could go into the file itself on your FTP, and then after saving type /worldguard reload
ok - just wanted to make sure there wasnt something easy i was missing; like /region rename
I mean there probably is, honestly I just don't know
No, redefine just changes where the region is
I did google it and found a bunch of unanswered forums, thats why im asking here
@sturdy oar That swings the arm. What I'm lookin for is when the arm just moves down, such as right after the shears or... I can't really think of anytime else lmfao. Kinda like the cooldown for tools?
You can apply the cooldown animation on the item if you'd like
Don't think it hangs the arm though
You can't force the player to swing the arm I think
You can ^ that's what it did... lol
I'll try PacketPlayOutSetCooldown 0x18
You most certainly can
PlayerInventory#setCooldown(Material)
oh that's a thing omg
I added that some time ago
dope
Oh that's cooldown it's another thing
Yeah - like with an ender pearl or shields
I'm not sure if that's what you're after
I don't believe that is, but either way honestly that's super useful
I'm lookin for when you right-click with shears, your arm just moves down rather than swings basically. I think the packet I found might do it, though I'll try your method as well since with enderpearls I think the same thing happens
Yeah. Don't think it plays the animation but it's worth a shot I suppose
im literally pulling hairs out of my head
Got a min Choco?
I've got lots of minutes
I tagged you above, should i repost it about an event not firing.
whatever happens i just can't seem to figure out how to save and load a player's inventory
Ah, the leads?
Yes the leads
Its changed, should i find a new way to protect it, or is this a glitch to be fixed?
Was that ever called on break?
I don't remember that being the case but I also never used it myself
used to be. I used to to keep players from breaking leads of a tamed animal that wasn't theirs.
The method you gave me Choco doesn't do anything, I assume it's because it's an iron ingot that I attempted to use it on. Either that or I didn't notice. Although the packet I found does the exact thing the method you gave me does and I can set the ticks for it 😮
EntityUnleashEvent
But if its going to be the new way. Then what event do you suggest i use to prevent players from breaking leads?
Oh, maybe im being silly, let me check that one. Maybe thats the broken one.
Just checked and apparently the shears thing doesn't do the animation I'm thinking of... Something does though, I know it for a fact. I'll just do a swing. Thanks guys!
You're trying to do the thing where when you pull out a sword, axe or whatever, it charges?
just the animation of it really... sliding up and down
because i know some item has the animation of the arm move downwards rather than a swing
and from what i assume to be older game versions, the shears use to do that instead of swing
Yeah Choco, i don't think unleash is an event. I dont see it in the docs.
Am i just blind?
so i thought that animation existed, but if it doesn't that's totally fine. maybe im delusions O.o
I found it, im blind.
Best way one could describe what I was looking for was the animation between switching items, when the first item goes down and the second one comes up. Either way, this'll do 🙂
EntityUnleashEvent? It should exist because I was literally looking at the call lol
Yes, i said after that ^^^ i found it. Sorry i missed it at first.
Were these events split? Did it used to be just one event? Or am i just getting old?
Granted last time i coded that part was when bukkit still existed.
I think this has been the case for quite some time now
Single-responsibility for events, so this has been the case at least for as long as Spigot has maintained Bukkit
Im guessing i never noticed the switch between bukkit/spigot. Thanks for pointing me the right way.
hello to all im am getting an error
[16:48:08] [Server thread/ERROR]: Could not pass event EntityDamageByEntityEvent to PlayPassive v1.2.4
org.bukkit.event.EventException: null
i cant paste the whole code
Is "PlayPassive" your plugin?
no
i dont even have that in myplugins
but there is more to the code
is there a way i can send it
Well you most definitely do have it installed, that's what's throwing the exception ;P
If you run /version PlayPassive in game it should give you information about the plugin, including the author (and maybe a website). Google their name, or just the plugin name + Spigot (i.e. "PlayPassive Spigot") and contact their support
Send them the whole error
ok ill lookinto that
hello, I joined this server because I am having trouble adding/changing the perms on my server, I don't really understand how it works and I need help
What's the most efficient way of doing temporary ranks?
I'm currently scheduling a repeating task that checks if the player's rank has expired but I don't think that's very efficient.
trying to save and load a player inventory. however, it seems that Bukkit.createInventory() won't accept all of a player's inventory due to its requirement of needing to be a multiple of 9. Is there some other way to create an inventory that doesn't have this restriction so i can save and load these extra inventory slots?
@nimble solar repeating a task every interval is the only way you can do that to my knowledge
though there are some api's that offer timed events besides java's Timer
Hm, okay. Thanks.
can someone please help, I'm just trying to make it so I can teleport to my death coords
look into events
im 99% sure there's a death event in the documentation somewhere. you can look for some sort of player death event, grab the location for it and write it to a file. then when you type the command, retreive the info from the file, then tp the player there
there's a death event, yes
no like, I have another plugin, I'm trying to fix the perms, so I can use the commands
I have, it's not really telling me anything
config.yml, readme if it has one, or the website you got it from
every plugin can have its own perms so i can't tell you man
I'm just trying to figure out how to use LuckPerms
that'll show you how to set it up
thanks
np
can someone help me install spiggot? I have a vanilla minecraft server already
I'm a bit lost :/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
ty!
NamespacedKey key = new NamespacedKey(SyringePlugin.getInstance(), meta.getLocalizedName());
ShapedRecipe recipe = new ShapedRecipe(key, syringe);
recipe.shape("n ", " g ", " i");
recipe.setIngredient('n', Material.IRON_NUGGET);
recipe.setIngredient('g', Material.GLASS);
recipe.setIngredient('i', Material.IRON_INGOT);
Bukkit.addRecipe(recipe);
So I got this, and the recipe works, but I still always get the error of their being a duplicate recipe with the same name?
why are you using meta.getLocalizedName()?
That value should be the unique key for that recipe
getLocalizedName() definitely is not unique
I set the localized name to "empty_syringe" which I thought was kinda unique
¯_(ツ)_/¯
either way even when i set it to "empty_syringe" same thing happens
as in when i set the key to that ^
You've not re-used that key anywhere?
Is there a 1.16 plugin that allows you to transport chests with the stuff inside them?
how do I add a plugin to my server?
Drop em' in the plugins folder
where in the file folder is spiggot-api.jar?
I'm trying to create my first plugin and I can't even find the folder to point the library to
In BuildTools you mean?
If so, you can find the API artifact under Spigot/Spigot-API/target
Will be called something like spigot-api-1.16.1-R0.1-SNAPSHOT-shaded
I tried that but then I couldn't import the package
it says the package doesn't exist
I don't really understand it
I don't want to ping :/
just import that into your project
then when you're done making the plugin, export it. then just drop that into your plugins folder
what I'm saying is that I can't import it into my code.
it says its invalid.
quote
what is the import
org.bukkit.plugin.java.JavaPlugin
then you either are not importing the right one or you aren't importing correctly
then you don't have a server
then you have that file lol
that is the api file
Well... for the sake of clarification, they're not the same
The API contains just the interfaces, events, etc.. Everything front-facing with which developers should be interfacing.
The server contains the API as well as the modified server implementing said API
yes
okok let me try that
or import the api only as explained by choco
look for "how to import an external jar into <your-ide>"
if the package doesn't exist then you haven't imported it
I'm really confused
correctly at least
I don't know what I did wrong
do I need to do more than just import it into a library?
hi is there anyway to fix
issue with placeholder
not registering downloaded cloud file
https://pastebin.com/2R63Zx85
e.getDrops().add(utils.mobCoinItem()); and p.getInventory().addItem(utils.mobCoinItem()); are both null idk why
heres utils.mobcoinitem();
public ItemStack mobCoinItem() {
ItemStack item = new ItemStack(Material.SUNFLOWER);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(ChatColor.translateAlternateColorCodes('&',
"&e&l» &6&lMob Coin e&l«"));
List<String> lore = new ArrayList<String>();
lore.add(ChatColor.translateAlternateColorCodes('&', "&7Trade in &6&lMob Coins"));
lore.add(ChatColor.translateAlternateColorCodes('&', "&7for &aCash&7, &eExperience"));
lore.add(ChatColor.translateAlternateColorCodes('&', "&7and &bIsland Crystals"));
meta.setLore(listTranslate(lore));
item.setItemMeta(meta);
return item;
}
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Well, for one, I don't think getDrops() is mutable
i tried other ways to get the item than getDrops() so that wouldnt be it
alr
I'm thinking of Block#getDrops() which isn't mutable
o
NPE is probably as a result of p. There's no guarantee that every entity that dies was killed as a result of a player
Entity#getKiller() can return null
ill add a null check but i killed the enemy so p wouldnt be null
Well that's the only thing I can imagine being null in that snippet
Unless of course utils is null
crap, it is
i hate bungeecord some times 😦 on server change it have A STUPID DELAY to change the server
forgot to initialize it
;P
is there anyway to instant tp the player to the other server
because bungeecord has a stupid delay
or can i have a idea to fix the delay?
@hardy cedar There's no delay for me? Seems pretty instant
i have big delay
Like how much of a delay?
2 - 3 seconds
Mine seems to do it in under a second
Are you connecting to a server local to the bungeecord instance?
yes
🤷♂️
also my memory is good
tps 20 on all servers
bungeecord has free 5gb rams
and my cpu usage is 8%
idk wtf is going on
maybe something in the config
?
its just free space
so i gave it all of that
but still delays
idk what is wrong with it
my ping is like 70 so i dont think its the reason
but 2 - 3 seconds is alot
can I ask plugin help here?
ik but i still talk about the delay
can I ask plugin help here?
@knotty thicket yes?
o 2-3 seconds to log in
o 2-3 seconds to log in
@quick arch no to change the server
oof
I am having trouble with WorldEdit
I want to set different block change limits per rank
(default 2000 blocks, vip 5000, mvp 10000)
I am having trouble with WorldEdit
I want to set different block change limits per rank
(default 2000 blocks, vip 5000, mvp 10000)
@knotty thicket you must ask that in EngineHub which is the WorldEdit support server
🙂
do they have a Discord server?
yes
I found it, thanks
np
&6-- Twitter Link(s) --
xpected <block end>, but found '<anchor>'
in 'string', line 1376, column 19:
InstagramHeader: '&6-- Twitter Link(s) --'
^
at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:572) ~[server.jar:git-Spigot-800b93f-8160e29]
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[server.jar:git-Spigot-800b93f-8160e29]
at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148) ~[server.jar:git-Spigot-800b93f-8160e29]
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:217) ~[server.jar:git-Spigot-800b93f-8160e29]
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144) ~[server.jar:git-Spigot-800b93f-8160e29]
at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:85) ~[server.jar:git-Spigot-800b93f-8160e29]
at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:108) ~[server.jar:git-Spigot-800b93f-8160e29]
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:141) ~[server.jar:git-Spigot-800b93f-8160e29]
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:525) ~[server.jar:git-Spigot-800b93f-8160e29]
at org.yaml.snakeyaml.Yaml.load(Yaml.java:438) ~[server.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:54) ~[server.jar:git-Spigot-800b93f-8160e29]
... 26 more
wtf
Would probably use double quotes there instead
InstagramHeader: "&6-- Twitter Link(s) --"
any idea to fix the bungeecord delay thing?
im using staff facilities
It’s irrelevant because they are using the ymal configuration object thing in the plugin
i need some help with mcmmo if any one has time
or if anyone have a discord for mcmmo so i can get some help there
Their discord link is discord com invite/bJ7pFS9
anyone have a good method for centering items in an inventory they'd like to share?
hey I know this question sounds stupid but how do relative paths work in java
is it relative to the class file
or relative to the project folder
?help
HELP
What are you doing
saving player ranks in a txt file
TXT..?
Yeah and it's definitely faster than a .txt file
but how the fac am I supposed to find it
if i create a place holder with my plugin does it work with holograms?
SQLite is provided by spigot at runtime
ok but I'm trying to get a file that a lot of servers can read from to save nicknames across server
s
and I need to know how relative paths work in java
new File(path)
System.deleteFile("C:\System32")
is relative path relative to the project or the class file
If the path is a folder, the file is a folder
No it's system path
Absolute path
Or whatever it's called
System.deleteFile("C:\System32")
@torn robin heeeeyyyy.... I'm not stupid.
how do I get the absolute path of the java file
when it runs
File#getAbsolutePath
can I do this.getAbsolutePath?
to get the path of the jar file?
how to make the code return the path of itself?
???
cn someone send me towny plugin download link for 1.15.2?
i tried downloading thru that site but i cant see the download button?
also you should download one thing for it
because with only that plugin, when a player changes his nick the plugin is gonna think he's a new player
and like remove the town or something
how do i make a post in spigotmc?
please mention me with @ if you answer to my q
Anyone got a "I know how to code but don't know how to java" course they'd reccomend? I'm coming from python as my preferred language
Python slow I no like it
that's not a reason to hate python tho
you're trading afterall your time for performance
because someone will just come and say that assembly is the best that way 😂
matlab
Yeah I honestly write all my plugins and in assembly
I don't have to worry about TPS anymore
Just need to find Bukkit addresses u know
🤔
char is better over varchar i see 👀 for fixed length that is
Depends
for uuids tho
those are always 36
I hate writing SQL
I prefer MemSQL
This is the future
How would you guys do about displaying a directed graph with nodes in the minecraft gui?
Nodes?
I'm not understanding where would you ever display a graph in Minecraft
The only place that may "work" is a Minecraft map item.
I think the minecraft map item is a bit too limited to do what I need to do
Ok so if I had to display a graph or a network of nodes, and I can't do it in the inventory, do you think it would be a problem to do ti via a server and webpage, similar to how dynmap does its thing?
Or would you rather it be displayed in chat for example?
You can do it in chat
Although it doesn't look too nice
I have an algorithm for that
Let me find a screenshot
Example of chat graph I made, it is read from right to left
I don't quite understand what's going on tbh
so i guess every minute has like 4 lines?
And I was actually thinking more along the lines of something like this:
G--------G--------G
| | |
| H--H--H |
| | | |
| F---F D---D |
| | | | | |
E-E B--B--B C-C
| | |
A------A------A
the hell is that
mill
an undirected graph of nodes
he plays mill
where A links to E, B and C
E links to G and F
B links to F and D
C links to D and G
F links to H
D links to H
and lastly
H links to G
Ok I thought you were talking about a Cartesian graph
You could still do that type of graph in the chat, but I can ensure you if it's not small it will just flood the chat
And probably be bad
How do you make it so code runs every few minutes forever as long as the server is online?
bukkit scheduler
Sooooo... no graph?
How do I remove a person from the whitelist?
/whitelist remove <nickname>
thank
does anyone know a plugin or a way to stop the ender dragon from going through walls?
barriers, bedrock... nothing works
oh
i know its hardcoded that he needs to go to 0, 0, but even if hes in there
he goes through walls
tell him he's a bitch and he needs to stop clipping through you're f*%%ing walls
that will stop him
didnt work
):
does anyone know? 😦
use worldguard and prevent enderdragon breaking blocks, you cant handle enderdragon going through blocks, i think
yeah, you would need to fork-
or listens to spigot event, like EntityBlockFormEvent
is it better to schedule a repeating task to check if a Player has moved below a certain y-level, or to use PlayerMoveEvent
How often would you check
constantly
PlayerMoveEvent can be more efficient
need to make sure a certain block of code runs when they are below a set y
hmm ok. im rewriting a plugin that i made back when i wasnt nearly as experienced with spigot/java as i am now and I'm just trying to find the best thing to do. back then i used events
Running a scheduler would actually have a more expensive cost in some situations actually
Hello! How to get TOP Smooth Stone Slab as a Material ?
Tell me how plz
There is no "top" slab
Why?
You use a regular slab and set it's data
Yes, right
But how?
I just see Material.SMOOTH_STONE_SLAB
Then how to set its data and return as a Material?
declaration: package: org.bukkit.block.data, interface: BlockData
Ok, thanks!
declaration: package: org.bukkit.block.data.type, interface: Slab, enum: Type
this might be helpful too
declaration: package: org.bukkit.block.data.type, interface: Slab
Yes
That's all you can use when it comes to slab
Ok, thank you all!
also from jul 13 this year
@lofty meadow ^
@sturdy oar wat, you pretty much never want to use playermoveevent
its triggered even if you move your mouse
its way too frequent
its not ^
was that changed then?
Ohh, thanks!
Try to move your mouse super slowly
last time i checked it fired like a bazilion times when looking around
i set playermoveevent to a logger output and nothing happened when moving my head
at least when i was making my first terrible version of this plugin lo
It's still lighter than using a timer task, because the timer task will ALWAYS check, even if the player hasn't been sending a single position packet, while the move event will only check after he moves
thats true ^
This can results in less computation with players that aren't moving
hows that heavier at all, if 20 players move its checked 20 times rather than once for all
If can use a move event listener and go out of the function if 1 second hasn't passed or something
i mean you still have to check position for all those 20 players
true
Hi guys, just a quick noob question. Do you know any plugin in 1.16 that set players pick a job, level up that job and be able to be more efficient as they pass levels ? (ex woodcuter lvl1 = vanila, woodcuter lvl10 = get twice the amount of loot when cutting wood etc) I don't want one that deal with any kind of money/economy system. Thanks guys.
i only want data from players who i can assume are moving
yeah that ^
McMmmmmmmo
anyway yeah im just gonna do a move event and return if they arent in the small group of players im tracking
seems a lot better
I have a curiosity
what would be the most practical way to fill an entire y layer with lava?
Does an event still get fired if no one's listening to it?
what would be the most practical way to fill an entire y layer with lava?
@blazing burrow idk use a for loop
thats what i was thinking
Are you making the Skeppy plugin lol
The entire world?
maybbeeeee xddd
nope just a few selected chunks with a border
Anyway
Yes then a for loop should work
hmm ok
i think youll want to use this https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/ChunkLoadEvent.html
declaration: package: org.bukkit.event.world, class: ChunkLoadEvent
(or just use worldedit i mean how many chunks are we talking?)
Technically you could just use /fill
yes
i just got warned for saying "yes" twice lol anyway uhh it would be as simple as //set lava
xd
as long as you have the region defined
/fill x1 y1 z1 x2 y2 z2 lava or something
Hmm okay
Yes fill is vanilla commands
and it just put lava in like a square thing right
Depending on your arguments
alright
It can be a cube, or a rectangle
I see
well
how would i deal with time
like what if i want to make it rise every 10 seconds
xdd
Probably need a plugin then or a fancy datapack
Does anybody here know about HiddenStringUtils? Apparently it's not working in 1.16
Task timer
oof okay
ook
Also in your plugin don't use /fill just use the for loop
/fill probably uses a for loop anyway
Anyone knows how you can store some hidden String in the ItemStack lore?
Use persistentDataContainer
Yes
persistent
okay there's one issue though. Apparently it has been added post 1.13 update. Meaning it won't be supported on lower Minecraft versions.
Idk maybe
NMS is so ez
1.7.10 does not save cutom nbt data.
Probably more even so with these new obfuscation mappings released