#help-development
1 messages Β· Page 1096 of 1
i have level-data on tutorial world but im not teleporting to tutorial world
how do you teleport to the tutorial world? can i see your implementation
my plugin
have eventpriority lowest
but only works if player enter on server more that 1 time
on first time isnt teleported
and level-data have tutorial map
thats paper thin, be very careful if you solder to it
positive goes where it says + and negative wire goes on GRB
paper ???
then you can vary the voltage, but you also need to ensure you maintain the appropriate wattage as well
multivserecore
thing
i think
...?
im not teleported to my tutorial loc on first time
hes doing it better than me
im not teleported to my tutorial loc on first time HELP
How are you determining "first time" and how are you teleporting the player?
player.teleport on player join with lowestpriority
Could you show some code and perhaps we can help better?
if not i need scheduler player.teleport
the problem not is code
ON FIRST TIME
Mk, forgot you knew everything my bad
instead of on join try PlayerSpawnLocationEvent
^
so i was using 20 volts on something rated for 12, oops.
kek
tbf i dont know where to get a 12 volt adapter, maybe goodwill
mcgyver an alarm clock
is there any way i can do it then
(Theres probably a better way I'm not really sure) but you could model your own diamond for a custom item (any helmet or wtv) then just use that
I believe the items do render
Hmm
Must be something else then I'm not sure
how i see what plugin is using my cpu on velcoity
how i see what plugin is using my cpu on velcoity
how i see what plugin is using my cpu on velcoity
how did u do that
/summon armor_stand ~ ~ ~ {ArmorItems:[{},{},{},{id:"minecraft:diamond",count:1}]}
If it works with commands it works with code
The commands are running code too you know
Well yeah, then something is wrong here
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
i have a server and the raidfarms aint working for some reasons
like only 4 raiders are spawning
the rest aint
idk why
the server is paper
#help-server also, reach out to their plugins support channel
Also we're not paper
Well firstly I'd reach out to that plugins support discord if they have one, otherwise in paper, or #help-server and someone might be able to help ya
im bad at this lol
ah okay
do u know where i could find the paper discord server invite
perhaps
nevermind
i got it
google probably lol
how fix duplicate world multiversecore
wolds require different names, and don;t load a world twice
Hey, I'm having a problem really weird for me:
https://paste.md-5.net/eviwakibot.java
So i have this code that if the item is a rod it only detects when the click is left, however if the click is right into the air it is also opening the menu but it shouldn't?
I''ve tried many ways, comparing the items etc. Even one time I debugged into a return before the new ToolMenu ... (So the return should have been run) but the menu opened anyways, is there something off with Interact and rods?
It's an enum
It's really weird idk why that happens
?
Enum values should be be uppercase
Your else statement looks off
Oh true
I've tried different ways now xd
Youβre doing if type == rod else still open it
So both right and left click opens your menu?
yea
but right only when air
Make sure you're not using an old jar
I'm not
What does it do and what is it supposed to do
how can i do that stuff with bossbar and tp
If the tool is a rod, then open with left if not right
But rod seems a little bit off
Wdym by 'a little bit off'
Use a resourcepack and some custom fonts
It's not working, detects left and right with rod
but right only in air
but is that black thing a background or what is that
Did you debug if your getTool is working as expected?
Yep it was returning "rod"
Also pretty sure PlayerInteract fires once for every hand
Part of the resourcepack
Have nothing in the second hand
You have a character for background
and some negative space to move it in to place
Debug if your code actually enters the last if statement
let me try
https://paste.md-5.net/epixuzoyax.xml
I get this error to find the dependancies i need from this section of my pom file any help would be appreciated.
1 rigjht click fired that
Show your entire pom
and make sure you added the Spigot repo
I think you're missing -SNAPSHOT for spigot
That too
yessir
What exactly did you do ingame
1 right click
Oh wait nvm you said
and fired twice
?hand
Yeah one for main one for offhand
the rod
?interactevent
The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.
For example, only executing code if the main hand was used:
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
return; // do not progress past this point |
}
// provide functionality
}
The thing is I have the rod in my main hand, and anything in my second
So the debug should only be fired once right?
What is the item variable
wdym
Isn't rod bugged or something?
wdym
Because it doesn't make sense to me that with one click it runs twice
Show your getTool method
but getTool is returning rod
@Nullable
public static Tools getTool(@NotNull ItemStack itemStack) {
if (!isTool(itemStack))
return null;
String toolType = itemStack.getItemMeta().getPersistentDataContainer().get(toolKey, PersistentDataType.STRING);
if (toolType == null)
return null;
return Tools.getTool(toolType);
}```
Yeah even though it shouldnt
no, it should
Not for offhand
Oh, true
What is Tools#getTool(String)
Don't yell at me for this π
@Nullable
public static Tools getTool(String tool) {
if (tool.equalsIgnoreCase("hoe")) {
return hoe;
} else if (tool.equalsIgnoreCase("sword")) {
return sword;
} else if (tool.equalsIgnoreCase("pickaxe")) {
return pickaxe;
} else if (tool.equalsIgnoreCase("rod")) {
return rod;
} else if (tool.equalsIgnoreCase("all")){
return all;
} else {
return null;
}
}```
at least use a switch statement π
yeah, I said not too yell at me π
toLowerCase
I think when you right click a rod it fires twice
Could that be?
But not because of the offhand
Did you register the listener twice?
Debug step by step
Print PlayerInteractEvent#getHand
Then print the item, print the toolType string
okay
so it prints HAND twice the item and toolTType = rod
But with other tool it only fires once?
Isn't click with rod bugged?
Maybe the swing is another click?
Are you doing something to the item?
Just right click
No, not modifying
Comment out your ToolMenu open lines and see if its still called twice
It is being called twice
Or just comment out all code and only debug the hand
The hand is being HAND twice
not OFFHAND
Yeah ik, comment out all your code and see if it is still
And if it is make sure Spigot is up to date
it is version 1.20.4
And that you're actually using Spigot
using pupper, don't think the do anything tothat right?
Test on Spigot
same error
Really, aren't rods bugged or something ?
Doesn't the swing animation do something?
Because it is the only tool firing twice
and maybe that is firing the left click?
and that's why it is opening the menu?
is there a way to do block PDC in 1.7 or do i just have to store locations in config
1.7 π
im trying to make a crafting table that opens my printing press gui
isn't PDC from 1.14 or smth like that?
Yes
yeah i meant alternative to block pdc
Location or NBT
You can write the nbt tags yourself
Shouldn't be on a 10+ year old version
That doesn't even have Spigot builds available anymore
And isn't log4shell patched
So you don't know?
no
1.7 is wild as fuck
Yo send me the IP :> for log4shell reasons
127.0.0.1
yep just got a notification my mainframe was hacked and the firewall was bypassed
what should i do
download more memory
i tried that and my kernel said "kernel panic, wrote memory to ROM"
now it says this incident will be reported
wtf...
try using arch
what is an eular angle
angle of e
yeah
thanks
eulers number
2.1
not just any number
sorry if i wasnt clear
eular angles are like 3 angles so you can know the orientation of something in 3d space
iirc
Just to be clear, euler angles are simply representations of rotations in 3D space. They have no correlation to the euler number.
yeah sorry for the minor troll @stuck oar
πΏ
What you did to get such punishment β οΈ ????
tabcompleter does the thing where it removes non matching text from complete right?
usually it did that but currently it doesnt seem to
is it because my list isnt mutable?
lets say you have a list of "test", "somevalue" and you start typing "t"
it should show "test" as suggestion
hey guys how do i make a sphere
I would assume using math :p
yea the method fourteen suggested pretty much does that
Any interested in a job? I need like 80 lines of skript turned into a plugin. should be pretty straightfoward
i can do that aswell if you want
Okay Ill send it over
:(
spherical coordinates be looking hot
is anyone familiar with dynmap?
i got a dumb idea on how to make a sphere that i cant wait to try when i get home
Cannot resolve symbol 'PersistentDataType'
not finding bukkit api
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.21.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
what am i doing wrong lol.
can you have 2 eventhandlers for the same event?
how would i go about filtering only Materials that are Ageable
Yes
perfect ty
https://paste.md-5.net/ help someone
Material#createBlockData instanceof ageable
u gotta click the save icon
can u check my problem pls scroll up a little bit
error: Caused by: java.lang.ArrayIndexOutOfBoundsException
Hi, i'm getting a ClassNotFoundException and NoClassDefFoundError on class that i coded and are IN the plugin, they are not a dependency
Caused by: java.lang.NoClassDefFoundError: fr/vlxproject/primehardcore/utils/permUtils
at fr.vlxproject.primehardcore.utils.itemUtils.aliensItems(itemUtils.java:1405) ~[PrimeHardcore-1.0-SNAPSHOT.jar:?]
at fr.vlxproject.primehardcore.utils.guiUtils.AliensGui(guiUtils.java:183) ~[PrimeHardcore-1.0-SNAPSHOT.jar:?]
at fr.vlxproject.primehardcore.PrimeHardcoreCommand.onCommand(PrimeHardcoreCommand.java:42) ~[PrimeHardcore-1.0-SNAPSHOT.jar:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
... 39 more
Caused by: java.lang.ClassNotFoundException: fr.vlxproject.primehardcore.utils.permUtils
at fr.vlxproject.primehardcore.utils.itemUtils.aliensItems(itemUtils.java:1405) ~[PrimeHardcore-1.0-SNAPSHOT.jar:?]
at fr.vlxproject.primehardcore.utils.guiUtils.AliensGui(guiUtils.java:183) ~[PrimeHardcore-1.0-SNAPSHOT.jar:?]
at fr.vlxproject.primehardcore.PrimeHardcoreCommand.onCommand(PrimeHardcoreCommand.java:42) ~[PrimeHardcore-1.0-SNAPSHOT.jar:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
... 39 more```
oops, didn't meant to hit send already, so, it's IN the jar and everything, but when i load the server, sometimes some class doesn't load, it seems random, it's never the same, any idea what could happen?
i'm getting some cryptic npe rn:
https://paste.md-5.net/derazikaca.cs
Arrays.stream(Material.values())
.filter((material) -> material.createBlockData() instanceof Ageable)
seems to have something to do with thr filter line
java.lang.IllegalStateException: Cancelled ServerConnectEvent with no server or disconnect.
at net.md_5.bungee.UserConnection.connect(UserConnection.java:320)
at net.md_5.bungee.UserConnection.connect(UserConnection.java:301)
at net.md_5.bungee.connection.InitialHandler$7.done(InitialHandler.java:689)
at net.md_5.bungee.connection.InitialHandler$7.done(InitialHandler.java:679)
at net.md_5.bungee.api.event.AsyncEvent.postCall(AsyncEvent.java:40)
at net.md_5.bungee.api.plugin.PluginManager.callEvent(PluginManager.java:414)
at net.md_5.bungee.connection.InitialHandler.finish2(InitialHandler.java:694)
at net.md_5.bungee.connection.InitialHandler.access$1300(InitialHandler.java:81)
at net.md_5.bungee.connection.InitialHandler$6$1.run(InitialHandler.java:644)
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:405)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Thread.java:840)
``` Hi, I need some help?
@crystal flax what are you trying to do?
check if the distance between the block and the center of the sphere is smalelr than the radius of the circle
if it is smaller place the block
oh i forgot
I have only made /clear on a server
Okay, what does /clear do? and we need some code.
and loop over blocks from -radius, -radius, -radius, radius, radius, radius
I did this on a sub server /clear and then the error came up
inventorycloseevent on spigot 1.8 is sync?
All events are sync unless they have async in their name
So are you developing or this just came up?
u know what can be?
What do you mean?
?whereami
im #help-server lol
The only information you're giving us is an error that points to nothing. we need information to help.
No it isnt
No 1.8 support from me
no
then yes
java 22 with 1.8 is not normal nor the same
BROOOOOOOOOOO
leave the chat
this is from spigot server you can use /minecraft:clear
A fork of spigot isnt the same as spigot
so go to their support already
no
seems to do that with REDSTONE
Please report this in https://github.com/hpfxd/PandaSpigot/issues!
my iq is decreasing by talking to you
but the problem can be not pandaspigot fault
LOL i never even knew this was a minecraft command
It clearly is
yes it can kek
no
bro π€‘
what is bro saying
π
"java.base@22.0.1"
ok freeakyz_
THIS IS a BUNGEECOrd error because no error is output in the spigot logs, only in bungee record logs
and we are not pandaspigot
tf is panda spigot even
idk something something modern 1.8
but u are spigot support?
something something no updating
NOT Panda Spigot
spigot is not pandaspigot
spigot is not paper
but u are spigot support??
NOW U ARE PAID
yea guys it seems like Material#createBlockData isnt in fact always NotNull as the annotation suggests
i'm sure @ivory sleet agrees with you
this dude thinks panda spigot is an abstract class, that is inherited by panda spigot and therefor is the same
Wait weβre getting paid?
xD
Hell yeah when do I get my check
the rad yes
I want one to
@young knoll needs back pay
o shit where's my money
wtf @blazing ocean why do you get paid :(
cus i'm better :)
Iβm going to write a strongly worded letter to 
πΏ
could u guys stop arguing with that person and help me instead
Again: Support for 1.8 was dropped almost half a decade ago. You can simply not expect any help for a version that is severely outdated and only used by a handful of players.
Are you paying?
Did you make sure to filter out non blocks
but then Material#createBlockData should not be @NotNull
Bro what π
that implies all enum values give a non null output
this is the reeachyz kiddo
for (Person p : Spigot.getHelpers()) {
p.givePaycheck(p);
p.sendMessage("YOU'VE BEEN PAID $0.00");
}```
xD can you help me ```00:37:35 [WARNUNG] A task raised an exception. Task: net.md_5.bungee.connection.InitialHandler$6$1@1ba5363a
java.lang.IllegalStateException: Cancelled ServerConnectEvent with no server or disconnect.
at net.md_5.bungee.UserConnection.connect(UserConnection.java:320)
at net.md_5.bungee.UserConnection.connect(UserConnection.java:301)
at net.md_5.bungee.connection.InitialHandler$7.done(InitialHandler.java:689)
at net.md_5.bungee.connection.InitialHandler$7.done(InitialHandler.java:679)
at net.md_5.bungee.api.event.AsyncEvent.postCall(AsyncEvent.java:40)
at net.md_5.bungee.api.plugin.PluginManager.callEvent(PluginManager.java:414)
at net.md_5.bungee.connection.InitialHandler.finish2(InitialHandler.java:694)
at net.md_5.bungee.connection.InitialHandler.access$1300(InitialHandler.java:81)
at net.md_5.bungee.connection.InitialHandler$6$1.run(InitialHandler.java:644)
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:405)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Thread.java:840)
That being said: Im suspecting that you are closing an inventory in the player chat event, or opening an Inventory in the InventoryCloseEvent.
Either way we would need code for making any helpful statements about that.
i'd appreciate if you guys could look into that and open a PR if its actually not supposed to be like that
π π
is it really?
i might be him
how do you know
yo waht π
Hell nah "lil bro"
on skibidi
heya, anyone got an idea? thanks π
I can smell that gen Alpha on you
lil bro, dont be so sure about that
Are you using gradle or maven?
well anyhow im dipping
Oopsie I broke it
Hey I'm having a bit of a design issue atm. This is what I have so far.
public interface ShopItem extends Named {
/**
*
* @return The shop within which this item is being sold.
*/
@NotNull Shop getShop();
/**
*
* @return The price required for a player to purchase this item. Returns null if the item is not buyable.
*/
@Nullable Price getBuyPrice();
/**
*
* @return The payout given to a player upon selling this item to a shop. Returns null if the item is not sellable.
*/
@Nullable Price getSellPrice();
/**
*
* @return Whether this item is free for a player to buy.
*/
default boolean isFree() {
if (getBuyPrice() == null)
return false;
return getBuyPrice().isFree();
}
}
What I'd like to have is a way for different types of shop items to be made. The standard shop items are going to be itemstacks and executable commands. i'd also like there to be a way for future devs to create shop items. maybe a shop item that buys you some points or a custom plugin item.
Maven.
wdym
tbf, my code isnt that long
sure, dw wasn't gonna send hundreds of code to discord lmao
both 1.19.4 and 1.21 api had the same issue btw
It used to throw an exception until someone (me) broke it
his pom.xml isnt gonna fit in a code block
ShopItem and Shop should be decoupled
Price should have a currency which can be items, vault etc
it does have dependency, but i disable the plugin at startup if either isn't working, so it's not that.
why?. I want them to be coupled
Add, it would alow other devs to execute commands, that could give points or interact with other plugins
@Nullable String getCommand();
Easier to hook with
(and the current class not found isn't even using any dependency anyway, it's just player.haspermission checks)
Why do you have isFree() twice?
Easier to hook with
Once in Price and once in shop
I'd probably make a "PriceEntry" data class and have a list of entries
isnt that what price is basically?
Not exactly
Price in your case is a weird list of entries
but probably uses a map in its impl
it does
Can't really tell whats wrong, dont often work with maven, sorry
In short getCost(Currency) should be reworked into a "can afford" / get costs
It works fine as-is but it's a bit wonky
np, thanks for trying to help at least, it's still so weird that sometimes it load the class, sometimes it does not
i'm starting to think it's not my fault and it's spigot / paperspigot bug π§
boolean isAffordable(Player player, Currency currency);
default boolean isAffordable(Player player) {
for (Currency currency : getCurrencies()) {
if (!isAffordable(player, currency))
return false;
}
return true;
}
added these to price @echo basalt
Also, I don't understand why ShopItem and Shop should be decoupled
Anyhow, how should I go about this?
https://paste.md-5.net/boduliwanu.js
how efficient is this? and how would i add parallelism to it (it's called ALOT of times)
also ignore the unused String innerStart, String innerEnd, String outer parameters, i forgot to add the code where i used them in the paste
benchmarks...
default boolean isAffordable(Player player) {
return getCurrencies().stream().allMatch(currency -> isAffordable(player, currency);
}
and how would i add parallelism to it
Are streams faster than for loops?
i mean
Streams are really slow tho
like thereβs so many objects that are allocated under the hood when using streams
don't they get compiled to loops in the end?
whats the best way to perform a task when a player enters a bounding box? Do i just need to check every movement or is there a better way
Nah not really
Lmaooo
same π
Eh its fine if u dont need super performant code
on startup
Or other occasional tasks
Yea, I mean thatβs always an option
how slower are they compared to loops?
2x, 3x or what
parse placeholders
(including nested)
no
similar to papi
Depends on java version, but I think iirc the average is 40-80% slower
oof
Why would plqceholders be nested?
mind u they also consume more space
it's hard to explain, it's for a yaml-based language where you have a set amount of actions and placeholders and sections
if you want to for example calculate the player's damage multiplied by 2, without nested placeholders it would be almost impossible since arithmetic is a placeholder
so you would do something like this
%math:*player.damage& * 2%
inner placeholders start with * and end with &
?
And just run code afterwards
I lied
damn
Idk what tokenize means
for example %player_health% would output the player's health, it's good because most plugins support it
Wait let me check something
k
Using a mathematical symbol for placeholders in an arithmetic expression sounds like a system that was designed to fail
honestly, i tried to do it myself but it always conflicts because stuff like evalex parses 1 as an expression so i can't just check if evalex fails to parse it
i could design my own parser, but i will do that later on
actually now that i think about it
What do you even mean by "inner placeholder"
Explain that concept
no placeholder will be only numbers
Nested placeholder i think they mean
I dont see how that makes sense. Semantically i mean.
an inner placeholder is just a nested placeholder that is parsed before the outer placeholder, for example %*player.damage& * 2% which would first parse %*player.damage& then parse 10 * 2 if the player's damage was 10
Is this for placeholderapi?
no
Like some addon?
no
Ah
Alright but evaluating an expression is not a placeholders responsibility.
You can think about a placeholders as a commands with arguments. You have a start and an end for your placeholder, and arguments separated by another symbol.
For example:
#player_target;block#
The first parameter is your key, the second is an argument for that type.
that was just an example, other placeholders might also require arguments
for example if there's a placeholder that gets the target location x blocks infront of the player
you might want to put another placeholder as x
Yeah crunch is coolio.
But the problem here is that placeholders are being used like some uber expression.
Might as well write a scripting language and linter for it.
Give a concrete example and ill explain how to do it without nesting placeholders
Bro who is that ola guy lmao
if there is a placeholder called %get-target (amount)% and you want to put (amount) as another placeholder, for example the player's health. without a way to input placeholders inside of another placeholders you won't be able to do that
unless i do something like String.format
%get-target $1% using %player.health%
https://paste.md-5.net/edehexixol.cs
i have 2 instances of minecraft running so i can test that code is compatible across multiple accounts. This code executes as expected on one, but on the other, it only displays line 165.
But now you are building logic into your placeholder arguments. If you start this way, you will quickly encounter that you would like
to evaluate a number based on conditions. After that you might want to run something N times (so a loop). And not shortly after that
you will have reinvented skript.
byte data = this.getData();
if (isOpen) {
data = (byte)(data | 4);
} else {
data &= -5;
}
this.setData(data);
}
public void setOpen(boolean isOpen) {
this.setData((byte)(isOpen ? this.getData() | 4 : this.getData() & -5));
}```
this methods are equals?
format ur thing
?codeblock
You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
}
}```
Becomes:
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
}
}```
just compile java at runtime zzz
yes
ok thanks
i dont get why this happens though cause you would think it would be consistent between accounts
But i get what you mean. Treat it like brackets in arithmetic expressions. Parse the entire String once, and recursively evaluate the expressions from the most inner scope.
smile can u help?
alright
Just pls keep it like a strict parameter evaluation. No additional symbols or arithmetic expressions. Otherwise youll have to tokenize everything.
2 symbols for start/end
1 symbol for splitting into parameters
add
boolean canBeSuppliedTo(Player player);
void supplyTo(Player player);
methods.
public class ItemStackShopItem implements ShopItem {
private final ItemStack itemStack;
@Override
public void supplyTo(Player player) {
player.getInventory().addItem(this.itemStack.clone()).values.// etc drop overflow
}
Sure
should i have a class that registers listeners/commands or just do it in onEnable?
public void load() {
Core.getInstance().getServer().getPluginManager().registerEvents(new UserDataListener(), Core.getInstance());
}```
What i mean
depends on how many listeners or cmmands
You could add a void retrieveFrom(Player) and boolean canBeRetrievedFrom(Player) method.
I would probably try to do a bit more interface seggragation, but it should be fine.
just do it onenable
theres going to be a lot
Code runs as expected on one account, but not another when hosting 2 instances at one time
@EventHandler(priority = EventPriority.HIGH)
public void onInventoryClick(InventoryClickEvent event) {
if (!(event.getWhoClicked() instanceof Player player)) {
return;
}
i need check?
no
just cast
In general, yes. For this occasion, no. It is extremely rare for a non-player to click an inventory.
are there actual cases?
What case would a non player click an inventory
it's actually impossible
Player is the only HumanEntity type
Watch me implement the HumanEntity interface for my NPCs and let them click inventories
HumanEntity shouldn't even exist, it's just an API artifact from how Mojang organises their client vs server code
lmfao
π½Entity
it's meant to mirror nms Player (and API Player mirrors ServerPlayer)
the only other subtype for Player is ClientPlayer.. in the client, not the server lol
quick question, would it be possible to make the inner expressions use %? or would i need to use a character with an opening and a closing like parentheses
definitely use separate delimiters for start-end
is < a special character in yaml
You can use a single character, but that greatly increases your parseing complexity.
you couldn't tell otherwise whether the token is meant to be the beginning of one or the end of the current one
im just gonna change all of them to start with < and end with >
You could with semantic analysis if he has a parameter separator
#key.parameter.#key.param##
gross
Yes totally
Someone hop in there and help this guy. Im tiered and really cant stay neutral reading the code rn.
https://discord.com/channels/690411863766466590/1271984378699972710
public boolean isOpen() {
return (this.getData() & 4) == 4;
} this works on top block on door?
or only on bottom block?
int block datas 
doesn't door blockdata implement openable? and openable has isOpen
or something like that
Not in 1.8
ah
i mean if the top is open on a door then the bottom is open as well, unless u did some πͺ² to do it
Should never assume
you can test it by opening the bottom only and checking what it returns
If in inventoryclick the player clicks on the topInventory inv, will topinventory.getcontents return the updated items?
@EventHandler(priority = EventPriority.HIGH)
public void onInventoryClick(InventoryClickEvent event) {
Player player = (Player) event.getWhoClicked();
Inventory inventory = player.getOpenInventory().getTopInventory();
System.out.println("antes");
if (!inventory.getName().equals("Backpack")) {
System.out.println("TOMAA" + inventory.getName());
return;
}
System.out.println("depois");
Backpack backpack = plugin.getBackpackService().get(player.getName());
updateBackpack(backpack, inventory);
}```
no
there are very high risk ways like waiting a tick (pls dont) or updating the backpack when you close the gui (best way)
the 2nd way could prob cause a dupe if the server crashes and someone had the gui open, but u can fix that with afew stuff
is 90ms to parse 1000 placeholders with random depth upto 5 good?
Sounds fine to me
ok
never use inventory name as a check
players can rename inventories
vulcan be like: what could possibly go wrong
use a gui manager
who tryna beat my nbt serializer
I'm surprised anyone is making backpack plugins still since shulker boxes are a thing
I'm getting an error every time and I've tired reinstalling everything needed ti run the build tools
Makes plugin where you can shift rightclick shulker in air, and it just works
?paste
but you can put it on your back and can do other fun UI stuff
nice graphs, are you using python or something to plot these or whatever library you are using to benchmark generates them automatically?
Hello, this is an update to the post I made yesterday about trying to make a drill plugin. End goal is to be able to adjust the width, height, and depth all through config, but I am still struggling to understand how all of this works. The code is found below:
https://paste.md-5.net/apibilubot.cs
this is the video example: https://streamable.com/ifed72
rust has a library criterion, you can do cargo bench and it automatically generates it
this is the video example: https://streamable.com/ifed72
oh I thought you were doing it in java, I've used criterion before, it is nice
i quit java
i like the peaceful nature of java, but im making my minecraft server framework to beat spigotmc
you can actually do shit on other threads frfr
and no inheritence bs
made my own ecs along with it, and now my own nbt library too
its just a hobby project though, for fun
Sounds like you love putting yourself through unnecessary torture
itll be impressive for my uni application innit
You supporting components?
if i say i rebuilt minecraft's server from scratch, networking, storage, state, everything
https://paste.md-5.net/geduwogimu.makefile
I've been trying to build a version of spigot for minecraft 1.21.1
does a version for that exist yet or no?
right now im in early stages :p
Spigot has zip support for components so
gotta work on chunks and shit
Java is wayyy more capable in the concurrency scenario than Rust, but Rust avoids a lot of common gotchas that only now with Project Loom are coming to a light in Java
Unless you do support em, not impressive! :p
what are chat components
or is this not the correct spot/chat?
I'd say so. I'm sure it can probably be optimized tho
Can u send the code as well as the code u used to test it?
did you kill it?
I'd like to play around with it
pretty sure you can find it on their website
k 1 sec
See if i can optimize it more
kill what?
the process
90ms is a tick and some so ehh
Basically just the system that handles formatting, colors, etc etc
I've restarted reinstall delete all related files restarted and tried to recompile and nothing
can u give an example
cuz with rust you can pretty much do anything
you can write python inside of macros
or script
Ehm if you wanted to, you could look at minimessage's impl
Basically fancy text
I would not look at MM, it is very general purpose and not focused on its performance
I've also turned off all firewall incase something was getting in the way nothing
I have a pretty aggressive firewall it doesn't like anything running unless I tell it, it's allowed then I have to micro manager every port/folder that a program want's to use if it didn't make those said files
it's good, but if you are trying to make something fast then it is not a good measure
let me try, where did u get jar from?
hmmm
im tryna make it fast & mem efficient
making something memory efficient most of the times makes it fast, it is all about getting the best cache locality
yep, thats how i made my ecs
it's a buildtool.jar or exe depending on the version you want to use
all the components are stored in a dense array
Spigot doesn't provide a download link anymore
max seems to be 1.20.4 no?
as per their wiki says
nope minecraft spigot 1.21 exist and 1.21.1 exist in their UI
why not just, click the download button in the navbar
I don't think spigot ever supported an online source for downloads
they did
I thought it's always been build tools
π
but it was DMCAed
that was like, a thousand years ago
by the craftbukkit guy
it doesn't matter
who made bukkit
idk some ass hat likely
dmcaing spigot is crazy
some guy named Wolf something if I remember correctly and some other guy
dont y'all give credits or some shit
it doesn't matter the guy seem to go ape shit over his code being forked
dinnerbone was involved wasn't he?
π
btw can minecraft sue me for making a minecraft server framework similar to theirs
yes, he was
not code-wise
yes he was involved code-wise, you can see a lot of his commits in the Spigot repo
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
thank you
sure!
Is there anyway to disable vex block phasing mechanic?
https://www.spigotmc.org/threads/no-clip-vex.349490/ not a straightforward one
jesus, spigot should fix their embeds lol
giant af
also how did you remove it?
put the link between <>
just hit the X button?
theres an x you can click
oh
I thought that only removed it for you
everyone
oh nice thank you
same reason people implement custom whatsapp clients which save the deleted messages
people are curious
actually it takes 20ms to process 1000 placeholders, the problem was with generating a random placeholder lmao
https://paste.md-5.net/ubewuzawef.cpp
benchmarking 101
real
You'd implement a system that doesnt remove the embed when someone wants it removed?
I love messing with people with that
I mean the link is still there kek
not able to help anymore?
What exactly are you trying to do? Just run latest BT?
yep
it won't even build 1.21 spigot
which java version?
1.21.1
yep
Also u got any error logs?
error logs here @ivory sleet
these are my two versions
anyone got an idea on how to solve this issue?
I just installed the top one which is version 22
And still didnt work?
What exactly did you need assistance with? allowing xyz offset configations from users?
This is odd
ye
basically allow the user to set their own offsets
but uh im struggling with making it work
error code when trying to build 1.20.4
15286140 [main] bash 61 dofork: child -1 - forked process 22608 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
applyPatches.sh: fork: Resource temporarily unavailable
Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [C:\Windows\system32\cmd.exe, /D, /C, sh, applyPatches.sh]
at org.spigotmc.builder.Builder.runProcess0(Builder.java:1042)
at org.spigotmc.builder.Builder.runProcess(Builder.java:967)
at org.spigotmc.builder.Builder.startBuilder(Builder.java:679)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:60)
same errors
it always fails no matter the version after WorldAccess.java
@ivory sleet ?
Im trying to read some bt code
oh ok thank you
I have no idea where to find 1.21.1 spigot build for the time being
how would i check if a string is a valid crunch expression
yeah i think so
I ran into this
i just realized something, how can Double divide by zero without any exceptions
oh wait dividing a double by zero just returns infinity
dividing a floating-point number by 0 in Java returns either positive, negative or NaN for 0 / 0
yeah, i thought it threw an exception for any division by zero
yea idk, i was using jdk 21 latest from oracle (altho temurin shouldnt change much), and trying to reproduce
i think its some issue with ASLR after browsing around
well its quite extremely unfortunate you out of all ran into this
time to change exploit protection warnings
hi, how can you hide an item in a player's hands when he is invisible?
packets iirc or remove the player from other players
(hides from tab)
or send equipment change
all languages do this, that is because division by 0 of floating-point numbers is possible due to the reserved bit patterns for inf and nan
well, low level languages anyway
dividing a non-zero by zero results in Β±inf as per IEEE 754
right, I didn't remember which IEEE standard it was
python just chose to not follow it lol
https://prnt.sc/wuWAesvjJ3wx
https://prnt.sc/uBtTrb_UjLJQ
I gave both JavaW and BT exception neither worked
@ivory sleet yes it was ASLR
I disabled it
system wide
and it work
but after this I'm just gonna use a VM to do this
well I knew some apps wouldn't play well with ASLR I thought just I'd never run into that issue
it's nice to know that you have to make your system more vulnerable to run a single program
Hard to tell what exactly caused it to go off
Git? Or BuildTools?
Lovely
yeah but you'd think git would be as well known as it is, it would've tested this.
and made sure it worked with this
time to reboot my pc again to turn it back on see you guys in 30-50 seconds
it is git though lol
more specifically, cygwin
there is a variety of technologies that can be used
it really depends on ones expertise in the field really
for example most commonly believe you need bungee or something similar to proxy
but there is other kinds of proxying such TCP proxying
TCP proxying relies on no VM rather just networking hardware
which is more suited then some VM or dedi doing it
so if we move the proxying to the proper hardware of a switch and utilize vlans the sorts, you can simply setup VM's anywhere in world and make them all appear as if in the same network π
they appear in the same network because of vlan's and you can handle the proxying on the tcp protocol level
precisely its a man-in-the-middle
however given the updates to MC we technically don't need a proxy anymore though
depends on how you want to setup your network infrastructure or what is required
for example you may want load balancing since maybe too many players enjoy that game mode
not necessarily
but it could be part of it
basically you have load balancing for varying aspects, you can have load balancing due to resource restrictions on the Dedi
you can have network load balancing so you are not over saturating your bandwidth etc
yeah it only works with ASLR turned off system wide
@ivory sleet doesn't matter if I select every exe program that maybe used by/with BT
Ideally you would limit the VM's resources otherwise you might as well just use the dedi itself lmao
it doesn't have to be disabled system wide, but adding all the appropriate executables to the list of exception is too tedious anyway
I tired everything I could find that was related
so you would setup maybe 4-5 vm's on the dedi maybe more depending on hardware. Then you would assign that dedi to a load balancer, and you would have maybe 5-6 dedi's to a single load balancer maybe more, depends on your setup really but for sake of example we will go with this. Then in front of all your load balancers can be something like a proxy and all it needs to do is just over time pick a different balancer to send the connection to. This would be load balancing for the network, and then all the various VM's would be load balancing to ensure that to not be over whelmed as well as making sure there is enough open games
dedicated server
refers to the entire server box
and some of the failed "program/process" PID was either invalid (due to program/process already ended before I could even filter for it)or found them and still didn't work
simulate? possibly. VM's allow for such things
copy and paste
op not anymore
now the server is crashing with version 1.21.1 spigot
skill issue
linux is better suited but it doesn't mean using windows is impossible either
I mean, it is simply due to the amount of online resources you can find in self-hosting and whatnot in a linux environment
windows server solely depend on microsoft's personal tech support to know anything meaningful
it isn't impossible, but definitely not something I'd recommend to anyone
that is, for serious servers. For a friends server you can use whatever since that doesn't really require any advanced sysadmin management or knowledge in general
this isn't really true
and nor is it the reason why linux is better suited for VM's
however there is a type of VM that windows is more suited for that linux is not
when it comes to DE VM's windows wins
what does a DE have to do with a VM
I know what DE means, and no it doesn't mean anything
why do you think thin clients can exist?
https://prnt.sc/pcK-5mpqcyO9
doesn't work
it is literally the first function defined in that script
what is Windows Powershell smoking
I'd update to Powershell Core if I were you
powershell 7 I think
that's powershell core, you are running Windows Powershell which is the older version
you can tell by the icon, PSC's icon is dark and WPS is blue
https://prnt.sc/jRr3iQk72MNx
already install lmao
gotta find the missing powershell
brb
has anyone made a similar plugin? I'm currently struggling with making it work, any help is appreciated
WAY AHEAD of you on that by almost 10 minutes
plus you tired the command wrong
oh wait
I didn't know you could do that
it umm https://prnt.sc/3O5_JPpXnE_Z
hated it again
more uptodate
do . Add-Git..
of course, with the actual name
afterwards, execute .\Add... again
what are you struggling with
are you able to VC to help me faster?
ops yes my fault
it's on my desktop my bad
I don't speak fluent english so I wouldn't be able to help in vc lol
rather, my accent just sucks
same problem
I also ran Set-ExecutionPolicy Unrestricted
so it's unrestricted right now
it doesn't like it at all
do . .\Add...
I don't think you would have said rather or put a comma if you weren't fluent
it took it?
I can write fluently, but I almost never chances to speak it when learning so my verbal skills are way behind
it is done now
In the original post, theres a video and a description of my problem
use build tools in the terminal instead of the GUI
java -jar BuildTools.jar --rev 1.21.1
you'll have to cd to the path that contains the BuildTools.jar, of course
did BuildTools generate a work folder or something?
I can delete all past tires
rather, just do ls or dir and send the output
nah, I wanna know where the applyPatches.sh file is
well it doesn't matter, run BuildTools again and look for that file
I know it made them for a fact
once you do that, open a git bash prompt (you can open one in the same terminal with the arrow function in the terminal tab)
cd to the folder where the applyPatches.sh is and do sh applyPatches.sh
my bad it does not exist in the work folder only in the spigot folder
well, the file doesn't matter, I just wanna know what error it is throwing
uhhh never ending loop till it self closes
the terminal itself closes?
yes
it runs for a bit then closes
oh never mind I'm opening the SH file by itself
gimme a moment
I may have give you a heart attack
gimme a moment
sorry
also do git --version --build-options and send the output
applypatches.sh exists in craftbukkit and spigot server git repo's
I recommend installing git for windows
and run buildtools using git bash
uhh yes it crashes
wait what, that command does?
your git installation is borked if that's the case, reinstall it again
new install of windows just yesterday and gitbash today 6 hours ago now
When will PlayerMoveEvent.getTo().getBlockX() be null?
don't do .\applyPatches.sh, do sh .\applyPatches.sh
it can never be null
it is an int
intellij is bugging then idk

