#help-development
1 messages · Page 1460 of 1
i think they do
I think it just darkens the sky? Idk
it isn't very flexible though
and i think it was just the fog color
not sure though
Just send the client a nice message telling them to set their render distance to 2
probs
btw, I mean this (fog)
have you done that?
and it is possible to set a player's chat without noticing that a message has been sent, or something similar, I have an idea to do this:
and every second the chat will exchange the message for the remaining seconds
@quaint mantle you cant
fog is 100% clientside
ohhh ok
?
#help-development message any ideia with it using packets
hmm
Spigot has a bossbar API
apparently so
yeah, but i doubt that would allow for that
that is on the packet wiki
it seems so
The only thing you can do is resend the entire chat and modify the last message
hmm what do you mean by message?
he's not talking to you
Scrolling when replying is very annoying
you referred a wrong person
craftbukkit-1.8.8-R0.1-SNAPSHOT.jar
|
will this work
?
yes it does
@quaint mantle
head over to paper dev
okay jeff
You need to store the entire chat history and resend it
You can’t modify a message that has already been sent
?paste
but will the player notice that the chat has been modified?
and that I intend to take ALL the messages that were sent and resend them so as not to notice that there was a change
java doesnt count on indentation tho... atleast i think so
Error occurred while enabling Spectaculation v1.0-SNAPSHOT (Is it up to date?)
java.lang.Error: Unresolved compilation problem:
Unhandled exception type ClassNotFoundException
at me.superischroma.spectaculation.Spectaculation.onEnable(Spectaculation.java:129) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:357) [spigot.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:317) [spigot.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.reload(CraftServer.java:741) [spigot.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.Bukkit.reload(Bukkit.java:535) [spigot.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [spigot.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) [spigot.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchServerCommand(CraftServer.java:627) [spigot.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedServer.aO(DedicatedServer.java:412) [spigot.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:375) [spigot.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot.jar:git-Spigot-db6de12-18fbb24]
Yes but our eyes do
xml doesn't require indentation to be exact no
lmao
soo, can u help?
class not found lmao
your runtime is lacking a class you're building against
i checked it
?paste
i mean
For some reason this only ever runs once https://paste.md-5.net/uvaxajivul.cs
whats at 129 in the main file
whats line 129 main
define "ever"
It does say unresolved compilation problem
Looks like you aren’t handling a checked exception
make sure you're actually setting it to false
f.e if this throws an exception of some kind, it'll never reach the part where you set to false
fair point
wrap it in try and put the reset in the finally block
you should only catch what you expect
129 Class.forName("me.superischroma.spectaculation.item.SMaterial"); // ensuring materials are loaded prior to this
then that class dont exist
make sure it exists
;-;
it is
it legit throws a exception there
Your ide will tell you these things
it doesnt exist
That’s not what the error is saying
it says ClassNotFound
The error says you aren’t handling the possibility that it doesn’t exist, which you have to
Yes, but read the rest of it
¯_(ツ)_/¯
My contribution to the Touhou community. Uses Google Maps API, Node.js, React, Python PIL. Haven't made the code public yet since I wrote it at midnight between midterms so it's pretty scuffed (but hey it works). Video is sped up, but there is still some lag in some parts (it's surprisingly difficult to get Google Maps to update render at a cons...
also getCraftMaterials()
Read the error
And then look at the red lines where your ide is yelling at you
That method can throw a ClassNotFoundException, and it’s a checked exception
the IDE said "The method getCraftmaterials() was not defined for the type Smaterials
this ^
nothing new lmao
do you guys actually use Class.forName
I use an empty static method
then call it on startup
Yeah that’s probably easier
where can i find people to make a plugin
you know how can do this very easy ?
not here
eclipse lol
no
i ran around for 8 more hours
because if if a maximum amount arrives, the message is deleted
use intellij
?
why the fuck do u use macos
ew
thats gay
¯_(ツ)_/¯
macos is bad
ik
u cant do shit with it
i can though
eclipse still fine till this
most programs support macos but some dont
the most unstable i can found is pycharm
PyCharm lol
in terms of programming, its actually probably better than windows
nah
due to how it is more unix like
it is
windows is still better than macos tho
unix-based are way better than nt-based
I both use mac and windows to code, and I have found the mac terminal to be the most adaptable for programming
but ik mac is bald
not for programming at all
@eternal oxide i have made it so that they can both look into the crafting grid however there is a 'Master' who can edit the items and 'Slaves' who can just look in but not edit them. Idk how far you got but that is my approach for now 😄
argeed
otherwise sure
i kinda like the windows terminal better i never used the mac one cuz i cant even fucking get one due to how expensive they are
mac is to expensive
u think i found comfort when trying to find a finder window?
not really
nt is fine
again, you advocate for 1.14
you have no grounds to have any opinion or stance on what is better or worse than something else
its gay for other things but for terminals, nt way worse
some kiddo copy src and put it into .bat and try to run it :/
nah unix is shit
tf
both shit, i use brain
most things dont even support unix
there is a stream tutorial
also u can get tools like gcc and maybe others from unix for windows
so
how old are you
damn, yeah all my unix based systems ship gcc
anyways windows for gamer, unix based for coders and ragequitters
dude i just dont like unix
unix is shit
you're shit
cry in powershell
at least diamond shit

idk i tried linux i just think its harder to do things on it
oooof
yes it does i just want to code and do some stuff on my pc
I mean, ease of accessibility is a factor of quality
at least if unix systems are shit, it will be plantinum shit
Pretty sure you can install the app and run it directly still either way
lol
the market place
and theres also a linux vm in windows
but then you are using linux what
it is, but we do be arguing about coding
theres a ubuntu terminal in windows
Yes, WSL
pls
wsl
ok
but that is literally just linux at that point
^
why do you argue against it then
i mostly use windows
like what
we are talking about coding too...
i mean i just use windows for things
Like, if you use WSL for anything code related
linux is sitll objectively better
oh
Agreed, development on unix based platforms is neat
package management build into your OS
we said UNIX good
NOT OS
dummies
what
what
are
uh wtf
do you know what unix is ?
oh yeah the ubuntu ui is crap lmao
a) nah some linux distros look sweet b) who uses the UI
ubuntu is kinda bloated tho even if its less bloated than windows atleast windows is semi faster
u know how comfort is that when i move a finder between desktops
??
it just
windows is faster for me
just like 1.14 is faster than 1.16 right
gone
windows is not faster LMAO
for me it is
you are using a stupid vm
and making comparisons
between a vm and actual os
thats like comparing an apple slice
to a full apple
?????
wsl2 is probably even faster 😂
makes no sense at all
at least on VM internal files
¯_(ツ)_/¯
isnt wsl like more-or-less native
idk i just dont like linux
some program, the user guide said, press for example Ctrl+Shift+A to open bla menu (for example this program is compatible with unixbased and nt based) then for Unix system, they don't even mind creating a guide for it
1st uncomfortable in normal usage :/
whats ctrl shift a do
a vietnamese program
dude, man is enough docs for days
?
lmao
but where is my 3 minute youtube video about the subject
what was this even about. As if anybody would actually say running a server or sth in WSL runs faster than in Windows?
how am I supposed to learn anything without flashing lights and shit
there is a program with ctrl shift a
read up
too much work... guess I'll go again then
why isnt it COMMAND + SHifT + A lmao
COMMAND in macos is like ctrl
lol
but they doesn't mind to use Ctrl
they use fn
and shift are being used for other purpose
i forgot why i turned on the big circle that appears when i press control lol
very cool
check mouse setting
ik how to disable it just i forgot why i turned it on
it called mouse finder
u have 2 screens?
nah
i have 3 and sometimes i think my cursor ran out of the pc and go out to find a new life
yes
u have more than 1 👀
u have 9
my cursor never want to come back
its just
woosh
lmao
my background have to go over as much screens as possible
i have 3 mice
that doesnt happen on windows much for me
it stucked between the border
wtf
i can still put it in the border but i will know that its in the border when its gone
and then i wiggle the mouse
out
i have 3 machines, 3 mice, 3 keyboards and each machine has 2 screens
well i can put it past the border but i can see it a little bit on 1 screen
one of the screens is a projector and the other is a tv
my cursor want a new life
u dont really need multiple screens also more screens u have the more you gpu is gonna be used more
businessman
i do
i have rtx 2080ti so why not? (this is MY windows pc not mac dun)
true. if you have a 60" screen you don't need anymore
i have like a tons of abandoned screens
i think one screen is enough for me for what i do
the left one is connected to on-board
and its dont want to work
i have alot of files on my pc
all of my secondary monitors are also physically left to the primary monitor
if its work i cannot connect to others
but are configured to act as if they were on the right
so if I want my pointer on the left monitor, I move my mouse right
eww
whats wrong with you D:
thats mank
idk how its still works since i abandon that in 2013
well i have a acer notebook LMAO so it isnt really a beast machine but its from 2018 i think
2018 or 2019
i forgot
god pc
i have 2009 acer
my primary machine's cpu clock speed is 600mhz
is that made by borsch and potatoes
it's intended to run at 1500mhz but because of passive cooling it's permanently throttled down to 600mhz
my brother PC use GTX 650TI BOOST oc lmao
how its able to run gta
i use 2080ti, feels bad
i have intel hd graphics XD
better than potato XD graphic 1000
i use amd
in the pc
expect the wifi card its by qualcomm
oven PC
i have intel modem
china?
which is owned by Lenovo
oh
Moterola
oh in 2012
intel HD Graphics 6000 1536 MB
it got sold
my mac GPU
to Lenovo
gg
lenovo?
gpu from the past
lmao it does say the person who bought it from google (lenovo) is in china
ye ik
taiwan
wse
lenovo is pretty young
i have A"SUS" RTX 2080ti
not sus
yeah it will override it lmao
like if u use the title command send two it overrides it
or if it doesnt it might send that title after
idk tbh

is there any real differenece between getSlot and getRawSlot?
yes but idkk
they sound the same to me lol
i dont know what the difference is
"If you were to have two inventories (top and bottom), #getSlot would be different for whichever inventory you clicked. For example, if you were to click in the first slot of the top inventory, it'd return 0 whereas if you clicked on the bottom's first slot, it'd still return 0. With #getRawSlot, in either case it returns a different int. In the top one it'd return 0 whereas in the second one it'd return a different one (bigger perhaps).
If you are going to listen on InventoryClickEvent and compare actions by slots, you should use #getRawSlot. If for example you were to use #getSlot and listen on slot 0, if the player clicked on either inventory in slot 0 it'd be executed. Not with #getRawSlot however."
Yeah i quoted it
who would use getSlot really tho
in this case its the same right?
can u even open two inventories at the same time?
You compare getSlot() and getRawSlot() if they are the same its one Inventory, if they differ, its the other.
You can then select top or bottom inventory as appropriate.
why when u open a workbench inventory why does the recipes and stuff not work
you have to openWorkbench, not openInventory
lmao why is it like that tho
It has to access the TileEntity and not the inventory for a workbench to work
why tho
because the tileentity has data it needs
The same reason Furnaces work. Its teh TileEntity that ticks
uh openworkbench needs a bool and a location what do i put
null for loaction, and true
its sad that u cant just open a inv with the type of workbench
wait why does a HumanEntity not have openbook?
also how does openMerchant work so i can use it with custom trades?
you can use openbook on a Player
if i have a string[] named "this:1:2" and i split it by : , then i have an array with this,1,2 . if i return array[array.length - 1] it would return 2 or 1 ?
does the last digit start at 0 ,1 or 2 (the array length)
2
an array with length 3 stores its last element at index 2
in a 0-based index world such as java
ah
How do I get the velocity of a player.
Entity#getVelocity
thanks 🙂
show plugin.yml
name: MyPlugin
version: 1.0-SNAPSHOT
prefix: MyPlugin
description: MyPlugin
author: GStudiosX
softdepend:
- PlaceholderAPI
commands:
test:```
api-version: 1.14
is it cuz i using a 1.16.5 api on a 1.14.4 server i mean it worked yesterday tho
no
yes
i want to try and support all versions
api-version: 1.13
isnt that wont be able to use that on 1.14
no
k
tho yesterday it worked with it
idk why it isnt working now
it displayed the correct item in the gui
and it also didnt error
it works
but
why did it work yesterday without it?
is there a way to upload 10mb premium plugin?
What tile entity
are you coding against a different spigot-api than the server jar ?
e.g. coding against spigot 1.16.5 while running 1.16.4
oooh
with these third party dependencies you wanna really make sure to use the same version, as new spigot versions sometimes bump these dependencies (and they might not follow the same backwards compatibility idea of spigot)
Thank you, I thought that by not using a package from 1.8 there would be no problems
I mean this is a rather rare case xD but yeah can cause these issues
yep xd
FUCK
i accidently deleted my whole plugins folder
so i deleted my configuration of some of my plugins fuck
I have never understood how people do that
I have projects going back over 20 years. Never deleted any by mistake.
um i was on a server host and i thought i was deleting my plugin configs and i deleted the plugins folder ;-;
Oh rip
remote 😦
?bt
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
where the NMS acutally exists
it doesn't provide src ig
??
nms code is obfuscated anyway
java -jar BuildTools.jar --generate-source --generate-docs --rev %Input%```
hey how can i get externalUrl from json?
"file": {
"type": "external",
"size": 0,
"sizeUnit": "",
"url": "resources/%E2%9C%A8authtools%E2%9C%A8-1-8-1-13-2fa-auth-plugin-2fa-addon-for-authme-nlogin-fully-editable.90387/download?version=399740",
"externalUrl": "https://go.pavlyi.eu/authToolsReleases"
},
Will that generate docs for nms?
only source
okay cool
It's also largely obfuscated
```How do i Mke sure If it is a certain color
The byte
Is there docs for those
1.8
Minecraft wiki may have the old data values
🤔
Yes, that is legacy
ik
Hey guys, so basically I had installed a plugin named Auction Master, created an NPC, I wanted to delete it for testing something (NPC Plugin: Citiziens), but now I have a nametag without reason in air (I tried deleting the plugin, restarting my server)
how could i delete it
Found it
Armorstand
what armor stand
It's probably a holographic displays armorstand
/hd delete
Btw is LightBlueColor=Aqua (sry for bein noob lol)
You can probably kill it with /kill @e[Type=ArmorStand,distance=..10]
i'll try
Make sure you are within 10 blocks
/minecraft:kill @e[type=armor_stand,distance=..3]
Right, namespaces are lowercase now
I get an weird maven error
?
bash or command prompt?
It's failing on Javadoc
Just import Material in that class
Also, # for references, not .
Oh it is. This is #help-development so I assumed
smh, md_5 import those dang material classes.
on a serious node tho, I cannot reproduce this with latest version and build tools.
I mean, the folder name suggests so but who knows xD
bash
are you compiling spigot 1.8.8 ?
try in command prompt
i run linux-
works here for me
and i didn't use ur command
ah
java -Xmx1024M -jar BuildTools.jar --generate-source --generate-docs --rev 1.8.9
you didn;t use my command but you asked me why my command didn;t work? ok
Someone else pls help, I run a normal humans java version and can no longer compile 1.8.9 😦
Bruh
Why not
i aint that fool
dont use 1.8, no problems
Ah rip
i even tried with zulu@1.8
5head xD
simple stuff we've been saying for 4 years
<version>1.8.8-R0.1-SNAPSHOT</version>
hmm
imagine if that could happen
i would be so glad
it's pretty easy
what is?
switching to 1.16.5
wdym this
the version they are trying to compile
Guess so xD
lol
Welp, yeah I can also reproduce this
👽
Tbh you can either attempt to use dev mode after fixing this or just, well don't compile it like this
why do you even need javadocs, aren't they available online to pull ?
like, you could just use the ones online
How you can make a custom texuared helmet wear on head and we can still see the textuare
Help chat also has the javadocs available
For net.minecraft
neither would this
There are no Javadocs for NMS
When using NMS you're on your own
Mojang just release your normal src for 1.8.8
I don't think mojang cares even a little about 1.8.8 xD
Hmm, it isn't like dead.. Is it?
They have nothing to gain for making it open-source
It has a high player base.
it's dead
1.8 has a low player base
dead as in no longer maintained by anyone, no longer supported by anyone
they don't have a proper community
they haven't created anything of note
they simply use it
that's not 'alive'
Not really there are still a lot of players enjoying it
bstat
yes, but "players enjoying it" doesn't mean the software is alive
nor does it mean it has a huge playerbase xD
Hmm
if the software was alive, someone would have backported something from the new api
and dealing with 1.8 development wouldn't be so ass
pdc on 1.8 when
but they haven't; they don't strive to improve or move forwards
it's simply a stagnating cesspool
I bet, If bstats makes checking about 60% of newer version server would have viabackward
1.8 players refuse to play on 1.9+ servers
but, but that still means it is 1.16 xD
because via doesn't properly do knockback or whatever it is that they rave about
like, if you wanna go viabackwards and run 1.16 go for it
definitively better than running pure 1.8
anyone know how can i disable TAB's Plugin affect on Citiziens NPC ?
i'd like to delete the "0"
that looks like a scoreboard objective
Yes
scoreboards are displayed on all player entities sent to the player
afaik you can't disable it per-player
how ?
;-; ?
OOOH
my bad
i read "you can disable it per-player"
ry
sry*
not sure if its the right channel
Sorry
imo we should deny premium resources from any developers that aren't fluent in english
or ask things in the wrong channels
🥶 🥶
i think tab has a thing to disable it for npcs but idk
if its tab plugin that did that
the issue is that it's a scoreboard objective
afaik it isn't possible to make scoreboard objectives not shown for specific entities
i saw this
#additional very limited line of text below nametag
#don't forget this enables on all player entities, which includes NPCs
#tags so you can find this section using the mighty ctrl + f feature: [NPC, Citizens, below_name, health]
the client just renders them on any player entities and pulls the data for them from the scoreboard
is it something about what i asked or
yeah that just basically says what i'm saying
it's shown on all player entities
which includes NPCs
¯_(ツ)_/¯
can please somebody help me?
you parse the json using a json parser ?
no with a YML parser
lol
any idea why maven wouldn't wanna include a dependency into the jar?
first idea is you haven't included the shade plugin
second idea is you've marked it as provided
I mean, you could use a yaml parser
i'm not sure if it is tbh, i think it might just be relocations
third, you are using Artifacts to build and not mavern
try {
URL url = new URL("https://api.spiget.org/v2/resources/90387/");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.addRequestProperty("User-Agent", "AuthTools");// Set User-Agent
InputStream inputStream = connection.getInputStream();
InputStreamReader reader = new InputStreamReader(inputStream);
JSONObject object = (JSONObject) new JSONParser().parse(reader);
boolean isExternal;
isExternal = Boolean.valueOf(String.valueOf(object.get("external")));
JSONArray jsonArray = (JSONArray) object.get("file");
Iterator<String> iterator = jsonArray.iterator();
while (iterator.hasNext()) {
System.out.println(iterator.next());
}
inputStream.close();
reader.close();
connection.disconnect();
} catch (IOException | ParseException ex) {
ex.printStackTrace();
}
return null;
my code
Why are we parsing json with yml
i'm not doing any relocations
i literally always shade something in with relocations so idk
trying to get the externalUrl
but it's worth a try
if you want to include a dependency in your jar, you definitely want relocations
And?
otherwise you can get strange issues with multiple plugins including that dependency
but a relocation would suggest modifying the path or something
Sure, but you already have access to gson
Yes, if you read up the chat you may find it was a joke xD
relocation is the standard pretty much
only case you wouldn't relocate is if the code you'd be relocating relies on reflection and hardcoded strings to find its own classes
so how do i get the file.externalUrl
for reflection and hardcoded strings? no, for the same reason as relocation isn't safe
the system isn't able to find the references you make with reflection, and so it can't determine whether a class is actually used by the project
i'm not using reflections
tho i'm not sure the dependency is tho it would be poorly designed if it did
show code
have you seen the inside of a penguin's mouth
xd
downgrade
?
don't forget 1.7 had an array
lol 1.7
new getPlayers returns a Collection
old returns an array
again, you should build against the version you're writing the plugin for
otherwise your compiler can't catch shit like this for you
oh
feels good to not relay on a immutable array anymore
I forgot spigot actually did a breaking change for that
yeah, changing it from an array to collection was supremely important
so important that breakage was acceptable
I see
in comparison to the material flattening, however
yeah, me being stupid 🤦♂️
that wasn't as important
so we had to cobble together a few bytecode hacks to make it not a breaking change
so what should i change the method to?
the right one
i am
clearly not
make sure you don't have any conflicting dependencies that also include bukkit
worldedit is one notorious example
your compiler is interpreting that method as one that doesn't exist in your runtime
there is a mismatch somewhere
oh
your compiler is interpreting it as the method that returns Player[]
but in your runtime it returns a Collection<Player>
which changes the method signature
which throws a method not found error
oh right, ill change the method to broadcast the message, instead send it to the online players
well that will hide the issue but not fix it
1.7.10's still good
comedy master right here
what is even the difference between 7 and 8
i cant be the only one who usued to play those weird prison server in 1.5.5
spectator
lol
diorite andesite granite coarse dirt
iron trapdoors
banners
barriers
mutton, lol
endermites
rabbit, armor stands
the guy memorized the updates of minecraft
depth strider
lol
imagine not having armor stands
no im on the wiki page
beacons started to change color in 1.8
they added all the wooden doors not just oak
how can i edit Loot tables like be a Datapake in Spigot API ?
you don't
help pls tnx
bukkit doesn't support datapacks properly
why
best you can do is like write a datapack and bundle it into your jar
and then extract it into the datapack directory on enable
I not need create a datapake with bukkit api . i need edit Loot tables
yeah loot tables are a datapack thing
Or this
ok tnx for help
how can i edit a players username (name above their head)
Bukkit.shutdown() should remove it
i don't know if the protocol supports changing a player's name without simulating them rejoining
the name is kind of not expected to change at runtime
well i want to "change " their name when they login to add their luckperm prefix
tab plugin
no
you don't need to change their name
you can add them to a team and set a team prefix
it would update every time you update it
hmm i hope that looks good
how can you register a command (i'm new to this)
by adding an entry in plugin.yml
How do I do that?
google "spigot help plugin.yml"
ok thx
so final ArrayList<Player> list = new ArrayList<Player>();?
for (int i = 0; i < totalItem; i++) {
if ((Main.get().getConfig().getItemStack(path + (i+1))) == clickedItem) {
if(Main.get().debugMode()) System.out.println("CHEST item found, removing at " + i);
Main.get().getConfig().set(path + (i+1), Main.get().getConfig().getItemStack(path + totalItem));
Main.get().getConfig().set(path + totalItem, null);
player.sendMessage(new GetMessage().get("itemRemoved"));
player.closeInventory();
if (Main.get().debugMode()) System.out.println("CHEST item removed");
return;
} else {
if (Main.get().debugMode()) System.out.println("CHEST removing item, item not found yet, totalitems: " +
totalItem + " current item: " + (i+1));
}
}```
am i doing something wrong here?
it wont find the clicked item
items start at 1 thats why i use path + (i+1)
what am i even looking at
its a gui
rewrite it from scratch
whats wrong
the cause of the problem is that == doesn't do what you expect it to do
i think i told you before
Take a shot for every Main.get()
the origin of the problem is that your code is horrible spaghetti
i need to get the clicked item, find it in the config and replace it with the last one then remove the last one
id die
if i had to do that for his code
lol
bro its like 5 lines of code
lol
5 lines of code can be shitty code
== is reference equality (and also compares primitives too). Bro this is literally one of the first lessons you learn in Java
also this will perform like horrid steaming shit
but why is it bad code
never run this on a production server
and its... quite slow
its only coparing up to 28 items
itemstack equals is potentially catastrophically slow
and your time complexity for this system is linear
and god damn all those getters. STORE THEM IN A VARIABLE
i dont have any other id for the item
each item is unique and i dont want to edit them
plus im in 1.12
yea ig
like I used to
use a map instead of iterating over a list
please dont
I will if I have to
that would do nothing but annoy people
shouting at people works
it doesnt
It wouldn't annoy people, it would force them to do the right thing
it does
it makes the dumb people go away
real men don't scream
wiat no
real men make you scream
give me a second i google it
🔥
ah it's you again
code?