#help-development
1 messages · Page 1835 of 1
spigot api could be translated :D
search on youtube: aqui é o brasil velozes e furiosos
im extending EntitySlime from nms (1.16.5) and using an empty implementation of initPathfinders to cancel its natural movement, but when i try to set a new yaw and pitch on it, the yaw and pitch is not changed (https://paste.md-5.net/qiputozaxo.java https://paste.md-5.net/equbisefux.cs)
basically when i hit the slime it should look at where im looking
uh do slime even have pitch
idk
ignore
Double Price = plugin.getConfig().getDouble("Items."+key+".Price");
Price don't exist in config '-'
'-'
?verify
so i found this: https://www.spigotmc.org/threads/direction-yaw-and-pitch-not-working.50972/page-3#post-1793003
but he did it for 1.10.2 and i need 1.16.5
Created this issue in case we don't hear from the OP:
https://hub.spigotmc.org/jira/browse/SPIGOT-619
i need some help with the variables he used
how to verify if "for" is ened?
ened?
ened
think you cant lul
why would you even want to
you dont
sad
actually
for (int i = 0; i < 10; i++) {
}
System.out.println("for ended :sunglasses:");```
i need it for:
if(items > 1 && moneyGanhar.get() > 1) {
sendActionbar(p, "§aYou sold §f" + items + " §aitems and earned §2$§a" + moneyGanhar.get() + " coins");
econ.depositPlayer(p, moneyGanhar.get());
}
hey
i can verify in PlayerToggleSneakEvent the action?
e.isCancelled()
moneyGanhar
? '-'
public EventManager getManager() {
return MainRandom.getPlugin().manager;
}```
Is this a wrong way to call another class? I don't want to be using MainRandom.getPlugin.getManager all the time.
Hmm
Usually you just pass your EventManager instance to whatever class that needs it
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
Server.getWorlds().get(0) returns the main overworld right?
might be
How is this not a singleton
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
or constructor
public constructor maybe?
Or someone did
among other things
Cause then they do this. Create 1 instance of the class
??
Fits in my pocket
But anyways what’s the difference between that logger class and singleton
send your screenshot directly here pls
the website you used to upload the screenshot is fucked up
So from what I see @quaint mantle the difference is if the instance is instantiated within the class file?
Yeah for real and I had to do a captcha and select what squares have boats
comparing loggers and singletons is like comparing seedless apples and electric cars
I’m trying to understand cause it showed that example in an article explaining not to use singletons and rather use this method instead
what method? sorry I was afk for like 2 hours
But I don’t see a difference besides instantiating the instance in onEnable versus within the class file itself
From
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
do you have anything that's not working, or are you asking a general question about DI?
Just a question. I guess I am not even sure if I use singletons in my own plugin since I clearly don’t know what is what
Use a hashmap should be faster
example
String a = String.valueOf("a");
switch(name) {
case a:
}
@olive lance
^
TL;DR: dependency injection = passing your main class in a constructor all the time
advantages: none, in your case
Does anyone know how to install JDA for spigot?
other option: static getter in your main class:
advantges, in your case: easier
wdym?
what do you want to do @tidal hollow ?
isn't JDA a discord lib for java?
private HCFPlugin plugin;
public Events(HCFPlugin plugin){
this.plugin = plugin;
}
boolean isActionLegal(Player player, Location event){
Faction playerFac = plugin.getData().getFaction(player);``` is this DI then?
yes
In order to make a discord bot connected with mc I need JDA At least that's what they told me
that's DI
yeah alright. Are you using mavne?
and the main class is not considered a singleton then?
maven*
Yes
your main class, in spigot, is ALWAYS a singleton
okay. you can freely use JDA but be sure to shade it. Does something not work?
Lore not working
ItemStack shiftvender = new ItemStack(Material.PAPER);
ItemMeta shift_meta = autovender.getItemMeta();
shift_meta.setDisplayName(plugin.getConfig().getString("Menu.Items.Shift.Titulo").replace("&", "§"));
ArrayList<String> lore_shift = new ArrayList<String>();
plugin.getConfig().getStringList("Menu.Items.Shift.Descricao").stream().map(s -> {
return lore_shift.add(s.replace("&", "§"));
});
shift_meta.setLore(lore_shift);
shiftvender.setItemMeta(shift_meta);```
https://github.com/r0wl/HCFPlus/blob/master/src/life/steeze/hcfplus/Utilities/ClaimWand.java So from what ive gathered then, this is a singleton correct? Is it a 'bad' singleton?
stop saying "help" and say what your problem is. and also stop using prnt.sc because that website is broken and doesn't work
ok
what is that?
edited
first of all please use proper method names
it doesn't break anything if you use UpperCamelNames but I just wanted to mention it
is there something not working with the class you sent? Do you get any errors?
,_,
No the class is working i was wondering about whether it is a singleton/not and if it is an inherently 'bad' singleton? Also what is wrong with the method names I thought lowercase first letter is correct?
I already told you two times that the stupid website you use to upload screenshots does not work
bruh
wtf
THE WEBSITE YOU USE SUCKS
can u not just
sorry for caps
'0'
This is what it looks like.
paste the screenshot?
yeah but not for me and many other people
Doesn't Lightshot have an Upload to Imgur?
can't you simply paste the screenshot here?
I always want to use the upgraded windows snipping tool but regular snipping tool is only one what works
I know you can with Lightshot.
No need at all to upload it to some strange website
How to get <@&695824786605080576> role?
You select the area and CTRL + C
Win > "snip" > enter
tbh no idea. @ancient plank
oh
@quaint mantle I think the bot is responsible for that.
pls help @quaint mantle get verified, otherwise they'll keep sending links to not-working screenshot websites lmao
the issue is that it does not let me use it, I mean I put public class Discord { private final JDA jda; and it does not work
nope. verification is done manually
So mfnalex what was the issue with my method names
"it doesn't work" means - no errors in console?
i verified '-
dark mode imagine
you did NOT get verified yet
his name is black and you need to accept that dark mode users
Im on light
check dm
He's not verified.
its not manual
He would have the rank as well.
!verify
Usage: !verify <forums username>
please read my status
sharing my project on intellij shares my entire intellij folder..
ok
oh sorry. is that new?
that's existed for a long time
can anyone help?
I mean it doesn't detect the JDA
That's how that works lmao
#general, prints here
no like, my projects folder
not project
it shares ALL of my projects
Oh
?
check #general channel
I must have confused it then, sorry
strange
@somber hull Send a screenshot of your current IntelliJ.
?
like ver?
Like, just a screenshot of it open.
have u tried restarting
y
i am rn
This code work?
ArrayList<String> lore_shift = new ArrayList<String>();
plugin.getConfig().getStringList("Menu.Items.Shift.Descricao").stream().map(s -> { return lore_shift.add(s.replace("&", "§")); });```
I wanna see if you have all your projects visible in your Project section.
i dont
it depends on what you want to do
@somber hull When you commit you should be able to select/deselect directories to upload
meta.setLore(lore_shift)
ik, but that doesnt show up
Weird
GG
and did you try whether it works?
I have the role
(ignoring the fact you're totally violating java's naming conventions)
@tender shard what was the issue with my method names
;-;
?
no idea, did you sent any?
how to make it work?
Yes here https://github.com/r0wl/HCFPlus/blob/master/src/life/steeze/hcfplus/Utilities/ClaimWand.java you said method names were bad
Common question but does anyone know how I would be able to remove a player from tab and still keep them visible in-game. I've been doing some online searches for awhile now but can't seem to find a good answer on how to do it. And also how I can change there name in tab aswell.
you should start with telling us WHAT EXACTLY IS NOT working
@somber hull Have you tried the Get from Version Control?
VCS ---> Get from Version Control
instead of just asking what's not working
we can tell you WHY something is not working
but we cannot tell you WHAT is not working
I'm trying to set the lore and it's not setting '-'
did you tell the itemsatck to use the updated itemmeta?
welp, i realized intellij needed an update. And now im dealing with this
nvm
it just showed up
leme try
ItemStack shiftvender = new ItemStack(Material.PAPER);
ItemMeta shift_meta = autovender.getItemMeta();
shift_meta.setDisplayName(plugin.getConfig().getString("Menu.Items.Shift.Titulo").replace("&", "§"));
ArrayList<String> lore_shift = new ArrayList<String>();
plugin.getConfig().getStringList("Menu.Items.Shift.Descricao").stream().map(s -> {
return lore_shift.add(s.replace("&", "§"));
});
shift_meta.setLore(lore_shift);
shiftvender.setItemMeta(shift_meta);```
yeah gradle is slow af
does it answer your question ?
should work
;=;
if it doesn't, you have another problem. check whether your code actually runs by adding some debug text output
ok
You could use https://github.com/Redempt/RedLib/wiki/ItemBuilder what would do all this for you. || @waxen plinth ||
VCS isnt showing up
spigotmc forum is literally the minecraft stackoverflow ngl
Is correct?
Never saw it that way before, but yeah you're right.
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Didn't really have an answer..
Look at the end of this
You need ProtocoLib
Or even this https://stackoverflow.com/questions/35524629/bukkit-spigot-removing-players-from-tablist-without-vanishing-them
Ok I will stop send link and go sleep
gn
Thank
ArrayList<String> lore_shift = (ArrayList<String>) plugin.getConfig().getStringList("Menu.Items.Shift.Descricao");
I can replace to §?
i using lore_shift for set lore in item meta
,_,
fixed
how
fixed 👍
Yo mfnalex
yes @mighty sparrow ?
event.setCancelled(true);
if (event.getAction() != InventoryAction.PICKUP_ALL) return;
if(event.getCurrentItem() == null || event.getCurrentItem().getType() != Material.SPAWNER) return;
ItemStack itemStack = event.getCurrentItem();
if(itemStack.getItemMeta() == null || (!itemStack.hasItemMeta())) return;
PersistentDataContainer itemData = itemStack.getItemMeta().getPersistentDataContainer();
if(!itemData.has(plugin.ENTITY_TYPE_KEY, PersistentDataType.STRING)) return;
Player plr = (Player) event.getWhoClicked();
String group = "gui.groups.default-group";
for(String i : config.getConfigurationSection("gui.groups.custom-groups").getKeys(false)){
if(plr.hasPermission("betterspawners.group." + i)){
group = "gui.groups.custom-groups." + i;
break;
}
}
int itemAmount = pages.getItems().size() + 1;
if(itemAmount > config.getInt(group +".spawner-amount")) return;
List<ItemStack> itemList = new ArrayList<>();
if (config.contains(plr.getUniqueId() + ".spawners")) {
itemList = (List<ItemStack>) config.getList(plr.getUniqueId() + ".spawners");
}
ItemStack itemClone = itemStack.clone();
itemClone.setAmount(1);
itemList.add(itemClone);
itemStack.setAmount(itemStack.getAmount()-1);
dataConfig.set(plr.getUniqueId() + ".spawners", itemList);
createGui(plr).show(plr);
Basically that itemList is taken from the config, then an item is added to it. Then the itemList is set back in the config to be used later.
My problem is that if an item is identical to another item in the list it just kinda doesnt work
Leme get the part where it populates a gui with the itemStacks
List<ItemStack> inventoryItemList = new ArrayList<>();
if (dataConfig.contains(guiPlr.getUniqueId() + ".spawners")) {
inventoryItemList = (List<ItemStack>) dataConfig.getList(guiPlr.getUniqueId() + ".spawners");
}
That list is then used here
int itemsPerPage = this.height * this.length;
int pagesNeeded = (int) Math.max(Math.ceil(items.size() / (double) itemsPerPage), 1);
for (int i = 0; i < pagesNeeded; i++) {
OutlinePane page = new OutlinePane(0, 0, this.length, this.height);
for (int j = 0; j < itemsPerPage; j++) {
//Check if the loop reached the end of the list
int index = i * itemsPerPage + j;
if (index >= items.size()) {
break;
}
page.addItem(new GuiItem(items.get(index)));
}
this.addPane(i, page);
}
It causes one item to show up rather than them to show up as different stacks
1.8.8
fixed
thats its durability, you'd just check that and if it was 15, boom
wow you are so far off lol
in 1.8, thats durability
because durability and item data seem to be the same thing
:D??!
what lol
yeah, dont ask
lol
could you help with this
in any item that cant be damaged, the durability of the item is its item variation
aight lemme see
wdym 'doesnt work'
i elaborated later
here
it doesnt even show up as one stack with multiple amounts
just one item
it could be because theres nothing that differentiates the items, if you looped through the list, added them all manually and assigned them an ID which lead to them, it will make sure they're unique
im using a framework so i cant really controll how they are added
But i can control the list ig
does the config file ONLY contain the itemstacks?
yes
should i assign a UUID in the items NBT?
yeah that could work, either that or use a txt instead of a yml
oh yea, im gonna use json later
you think thats the issue?
because of how yml works, if something with its key or data already exists, it doesnt see it and just pastes itself over the top of the old one
json and txt files are lists so they can accomodate the same object
I'm trying to create a class where you can pass an method and an event to create a listener- but how should I approach this?
the base Event class wont be enough to actually do much with the event in the parameters given.. so how should I have the type of event be defined in the method?
(i'm pretty sure this seems like a stupid question, but i'm not sure else how to put it)
This looks overly complicated
There's no standard way in the spigot api but my library has a method for that
with NBT/persistentdata?
Should work but haven't tested that
It serializes using ItemStack#serialize and then converts the resulting map to json
is BlockDispenseEvent supposed to fire when a block/item fails to be dispensed?
(for example, if it tries to dispense a shulker box but there is already a shulker box in the way?)
This seems like a dumb question with an easy fix but when i do:
'Location var1 = new Location(Bukkit.getWorld("world"), 100, 50, -304)' and i make another one that looks like this:
'Location var2 = new Location(Bukkit.getWorld("world"), 200, 60, 500)' then i have to player.teleport's like this
'player.teleport(var1)'
'player.teleport(var2)' it seems to teleport me to the 2nd rather then the first even if the first's condition is met
i can send the real code if needed
@wicked bear well the last statement is teleport to var2 so guess why you are teleported there
ok
package me.blaxxalotl.warp.menu.Warp.events;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.yaml.snakeyaml.error.Mark;
import java.util.ArrayList;
import static org.bukkit.ChatColor.BLACK;
public class warpClickEvent implements Listener {
@EventHandler
public void clickEvent(InventoryClickEvent e){
Player player = (Player) e.getWhoClicked();
if (e.getClickedInventory().getTitle().equalsIgnoreCase(ChatColor.BLACK + "Warp Menu")){
Location Classes = new Location(Bukkit.getWorld("world"), -13, 144, 50);
Location Market = new Location(Bukkit.getWorld("world"), 302, 66, -329);
switch(e.getCurrentItem().getType()){
case STAINED_GLASS_PANE:
e.setCancelled(true);
case DIAMOND_SWORD:
player.closeInventory();
player.teleport(Classes);
case EMERALD:
player.closeInventory();
player.teleport(Market);
}
e.setCancelled(true);
}
}
}
You're missing a break in your switch
Does anyone know why when creating a new Minecraft project and trying to put the version of the project it says that "an error occurred while trying to retrieve the version"
Happens to the best of us.
You can build 1.18 using BuildTools https://www.spigotmc.org/wiki/buildtools/
java -jar BuildTools.jar --rev 1.18
...
:/
is this spigot mapped?
bc it didnt work for me
read 1.18 release notes
yess
that is what im looking for..
🙂
idk i cant figure it out i swear there was like an easy maven resource
also if youre using maven don't you just add it to your POM?
Im trying to get if chunk is loaded, but it always returns false, why?
if(!c.getLoc().getWorld().isChunkLoaded(c.getLoc().getBlockX(), c.getLoc().getBlockZ())) {
Im in the chunk btw
How to get a player out of an InventoryPickupItemEvent?
If it's loaded, it will return false because of the !
This works in chunk coordinates, not block coordinates
You need to use getBlockX() >> 4 and getBlockZ() >> 4
nvm, wrong event
Like this?
if(!c.getLoc().getWorld().isChunkLoaded(c.getLoc().getBlockX() >> 4, c.getLoc().getBlockZ() >> 4)) {
You should probably explain why
It's because it takes chunk coordinates
Not block coordinates
So if you pass in 16, 16 it's checking for chunk position 16, 16 not block position 16, 16
But is this correct @waxen plinth
then >> 3 = 8?
ive put the mapping in my pom but cant find the references
i mean >> 3 = dividing by 8?
Yes
Ok thanks
hmm why is 2^ so important bruh
Because everything is in binary
Imagine removing the last digit of a number
10000 -> 1000
Same as dividing by 10
Slicing off the last digit divides by the base you're working in to the power of the number of digits you remove
So of course binary will be 2^
Does this load the chunk btw?
No
Yes
Ok good
getChunk loads it
I have this in my PlayerInteractEvent
if(event.getAction() != Action.RIGHT_CLICK_AIR || event.getAction() != Action.RIGHT_CLICK_BLOCK) return;
Even when i left click, it will return.
Does someone know what the problem is?
Whats the point of .isLoaded() for it then if it always returns true? :D
You're doing ||
If you do num != 1 || num != 2 it will always be true
Because every number is either not one or not two
|| = or right?
yup
Use &&
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
Or just do .toString().startsWith("RIGHT")
This works in chunk coordinates, not block coordinates
I made a bit of an attempt to do that, sorry if I had to be more specific
does anyone know how to understand how the mojang mapped works? i have the dependency and plugin but i can’t figure out what’s what
i’m not sure what this means but i’m guessing i didn’t read it when i skimmed thru
like what maven info *
Copy paste the dependency and maven special source info from the release post of your version
you mean run build tools with 1.18-R0.1-SNAPSHOT as the version
what extra command do i need to get the maven data
no
idk i cant rly find anything explaining this stuff but i could be looking in the wrong places
i have looked
no, it looks like you dont understand it
i havent seen anything to explain it so yeah like if i see how ppl do it ill understand it
ok
like what page should i be looking for
that link
i told you a few hours ago
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
are you talking about this and the plugin?
bc ive read through this and i must be stupid bc i dont understand what i missed out on
wait are you even using NMS?
i need to
oh ok
then do it
public class NMSShopkeeper extends EntityVillagerTrader { -> Cannot resolve symbol 'EntityVillagerTrader'
bukkit references are all fine
this is from 1.17
put into my 1.18
i asked maybe the names changed?
it provides you a way to reobfuscate the methods, the plugin and the dependency i mean
oh so on compile i dont break any rules? - bc i know u cant distribute stuff
yeah
now the import issue
ok so that's the plugin
right
is not relevant to the plugin
okok, so that's what im facing, is it known?
you should go and check 1.18 source
ok
where can i get that? from the same page?
do you even use buildtools bro?
i just use it to get the jar
to run my server
you didnt delete the files and stuff didnt you?
if yes
check the spigot-server in spigot folder
to see what is the new name for entityvillagersomething
wait...
EntityVillagerTrader.patch
found this
wait wait wait
lemme read the 1.17 post again
i mean i didnt mind using non-mapped NMS, but the issue is if i do that with 1.18 its impossible bc theres two methods named x() and one returns boolean one is void
https://www.spigotmc.org/threads/spigot-bungeecord-1-17-1-17-1.510208/#post-4184317
yeah you should look at it
alright i see
how does it know which maven repo is the right one?
that's the only ambiguity i see
String group = "gui.groups.default-group";
for (String i : config.getConfigurationSection("gui.groups.custom-groups").getKeys(false)) {
if (plr.hasPermission("betterspawners.group." + i)) {
group = "gui.groups.custom-groups." + i;
break;
}
}
why would it be seeing my first group when i dont have any permissions?
group is == to a config section
if (itemAmount > config.getInt(group + ".spawner-amount")) return;
int i = 0;
for(ItemStack item : items) {
i++;
if(item == null) {
items[i] = backgroundItem;
}
}
This code is meant to fill the background in the inventory, but it doesn't work completely. Does someone know whats happening?
https://i.imgur.com/C3t8b4V.png
ItemStack backgroundItem = createItem(/*Material.LIGHT_GRAY_STAINED_GLASS_PANE*/Material.ROTTEN_FLESH, 1, " ");
ItemStack[] items = new ItemStack[27];
Umm, I need advice. I am making an harder more realistic survival/diplomacy server, and was wondering would 40000x20000 sized world be too large? Would something like 20000x10000 be better
Why not make it square
That's not the main point, but might consider that
Also you can always increase world size later
I can't, since I am custom creating the map xE
Like
Custom generating off an image
Quite little
Probably like ~10-20 actively at the same time
More when there is some large conflict obviosly, but probably not ridiculous amounts
200k x 200k is probs the max u need
yeah
Considering there is no nether etc.
<dependency> <!-- Spigot (this includes Spigot API, Bukkit API, Craftbukkit and NMS) -->
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
still cant get my NMS imports to work
i ran build tools for latest and it's in my .m2 folder
Hey, is there a way to tell on which days on the server (in minecraft days) the player was online?
For example a player was online on minecraft world day 2 and 3 (40min).
Latest is 1.18.1-R0.1-SNAPSHOT, not 1.18
nah
dont do that
and btw this is for dev channel
go general if you ask that
Wdym don't do that
im finding a post from worldpainter reddit
lol so simple and i overlooked it
much thanks
that can tell you how to choose the correct size of the world for you
1 vote and 1 comment so far on Reddit
this should be it
it talk about a program named worldpainter
you can safely ignore them if you dont want to make cool terrain
with that tool
wait
lemme read the comment there again
it might not be it
The problem is, my server will have mineral "areas", which have more ore, so there needs to be land area
hmmm okay
just gonna ask how long you think it would take for a player to walk 4k blocks?
And its diplo based, so there needs to be stuff to right over
in worldpainter they measure it for about 24mins for 4k
20k x 20k takes like 80 to sprint corner to corner
Also boats, map has large oceans
And horses
i think 20k is a pretty good size
this is 10k x 10k and look how big it is
so 20k is enough i guess
or 35k - 45k, if you really want a massive world
I mean 20k x 20k is 400m blocks of surface
Even 10k is huge
Yes 400mil
that’s a cool map
got that random example from the internet
when i open the inventory, it will add it to an hashmap with the player as key. When i close the inventory, it will remove the key.
in the InventoryClickEvent it will check if the hashmap contains the key.
but sometimes the hashmap is null in the InventoryClickEvent.
But when in the open() function, when i put the inventory in the hashmap. And then log the hashmap, the hashmap isn't null.
Code:
https://pastebin.com/nQu29Kxq
Sometimes it works, sometimes it doesn't
Does someone know why the HashMap = null?
can you send an error code?
should be no reason for it to be null
also use uuids instead of Player
There's no error
e.printStackTrace(); then
if(!openInvs.containsKey(player)) return; should be throwing an NPE if it is null
do you mean it just doesnt contain player?
Yes
i'm testing it rn with uuids
That worked, thx alot
Nvm, it doesn't work again
player.sendMessage(openInvs.toString());
player.sendMessage(event.getInventory().toString());
https://pastebin.com/nQu29Kxq
The setupManager var is null to in InventoryClickEvent, i don't understand what is happening..
when i compile my NMS code with the mapping
i get classnotfound
im guessing ive messed the maven plugin up to recompile it?
let's say that I have 100 armorstands that should get blocks in a 3x3 grid and break them, would be creating a thread for every armorstand better or one thread to do execute everything at the same time or split every x armorstands in x threads
use a constructor instead of setting it in open
Show your pom
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>1.2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.18-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.18-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-spigot</id>
<configuration>
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.18-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.18-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>```
errors out saying it cant find Failure to find org.spigotmc:spigot:jar:remapped-mojang:1.18-R0.1-SNAPSHOT in https://hub.spigotmc.org/nexus/content/repositories/snapshots/
?paste
any operation affecting the world should be done on the main thread. That being said are the armorstands necessary? could be done without them
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>```
oh
i just saw the paste link
1.18.1 and 1.18
the armorstands are just something visual
and represent a reference point also
i mean you could pass the world data then delegate it to async threads but it would have to get queued back into the main thread to break them anyway
yeah, i cant remember what its called but there are quicker methods to change mass amounts of blocks
ill try and find the post
this one
will significantly boost your performance
yeah lmao but efficient
thx
according to that post default bukkit method is 60k blocks per second
which isnt horrible
I will just use the bukkit method
this looks really crazy
14M blocks per second :)))
i mean if each armourstand is only breaking 1 deep
thats 9000 blocks
not a huge amount
Didn't md improve the speed of the api method in recent versions
Those numbers might be a bit old
yeah maybe it is 1.14
guys what is PacketPlayOutSpawnEntity() int i in constructor ?
is it entity id or what
public Report getReport(int caseId){
Document query = serverDatabase.collection().find(Filters.eq("Case", caseId)).first();
if(query == null) return null;
OfflinePlayer reported = Bukkit.getOfflinePlayer(UUID.fromString(query.getString("Reported")));
OfflinePlayer reporter = Bukkit.getOfflinePlayer((UUID.fromString(query.getString("Reporter"))));
return new Report(reported.getName(), reporter.getName(), query.getString("Reason"), query.getInteger("Case"));
}
[11:20:01 WARN]: java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap')
[11:20:01 WARN]: at org.bson.Document.getInteger(Document.java:243)
[11:20:01 WARN]: at com.quzacks.plugins.utilities.ReportManager.getReport(ReportManager.java:38)
[11:20:01 WARN]: at com.quzacks.plugins.commands.staff.ViewReportCommand.onCommand(ViewReportCommand.java:35)
[11:20:01 WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
I don't know what I'm supposed to do.
Well seems like "Case" is a long not an integer
Is there an efficient way to see if a certain class/method is available as of a certain version?
Example bossbar
I remember someone has a great site for that
?jd
🤔
This shows only the latest
- it must be more efficient then this
opening every docs from the history is not really efficient
Thank you @hybrid spoke , but not what I'm looking for
Could do try catch LinkageError when using a class for the first time or some reflection to check certain methods and what not
Yes @ivory sleet , I did that before. But now I got a simple class where I do a check for the version
But I know there is a site available somewhere that has precisely that
Problem is that spigot is snapshot based
So even in a single nms version, the features may vary within api
Now hopefully people should stay on latest for each version
but yeah
Well yes
I also don't use NMS
never
But it's a fact, my plugin is being used by 3K servers, there are quite some still running older versions
so checks are required
I cannot just say, "dear server owners, as of now only supported for latest minecraft version". I would lose alot of server using it
Yuh
whats the matter with that lol
Lol
cant keep up with monke, you're running 10 versions or 100 subversions behind.
Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind
Can't keep up! Are you a monke? Running 10 versions or 100 subversions behind.
You know that is nonsense right? Many people have a good reason to stay with an old version of minecraft. If it really was that much of an issue that minecraft wouldn't allow you to revert back to older versions.
What would have happened if spigot didn't update their old 1.8 builds for the Log4J vulnerability?
imagine staying with monke...
There is a reason they did that
It's because there is still a big audience using it
1.8.9 and 1.12.2 are the two main version for old players, and both are over 6 years old
1.13 - 1.15 is the worst in term of performance, so 1.16+ is da best
Exactly, so I cannot just drop the 1.8 audience
Anyhow, I know there is a site where you can type a method and it checks in which versions it is present
It's that site I'm looking for
or something simular
https://checkingMethodVersion.com
Type: isMonke
Result: NNNJDWAJDIHAFIWOOPASJODJOA CANT KEEP UP WITH DA PWAHHHHH~~~~~1!!'
that website doesn't exist for me
i didnt say it exist
Then why did you send it?
Result: NNNJDWAJDIHAFIWOOPASJODJOA CANT KEEP UP WITH DA PWAHHHHH~1!!'
Okay I see, just making fun again ...
why cant?
like 8 years now
Because I have an audience
I don't know how many servers your plugin has, but you would understand if it was simular ...
That's great, but it's not the point. And if you don't mind, I'm looking for proper feedback or a decent answer, not arguments to drop my audience
A lot of people are still using that version and he would not do them a good deed there. He said that he has a lot of servers using it, so I can imagine a quite a bit of people will complain or stop using the plugin if the server is bigger.
Thank you @fervent gate
welp i mean you can still support 1.8 if somehow you only use spigot methods that still avaible in old version, but dont keep in mind that 1.8 are your main version
And you are 100% right
I'm sure that with enough time you can work up to those versions, but just dropping them would def not be beneficial. Even though 1.8.9 is old.
imagine people complain bruh, if that is a paid plugin then i can stop, but it looks like free
That would be an option at a certain point, but at this stage it's not possible yet
Why risk losing audience though, even it is free. There are quite a bit of reasons to not do that
You really don't get it
i see nothing to care when you lose a bunch of 1.8 user
1.16.5
Your profile, do you even have resources?
im doing some tricky things with vanilla right now so it not actually spigot
So if you have 1000 users, you don't mind losing a hypothetical 25-50% of your usersbase?
just dont have 1000 users, problem solved
if you have no users, you cant lose any
be smart
hmmm i would mind if they leave because of code issue or something
Well yea, but apparently he does have some, idk the amount though
but not if they are 1.8 user complaining about backward compatibility
whats even the topic
idk
@quaint mantle , you need to understand, once your plugin start to become somewhat famous, you cannot just do something for your own importance
nice
This is exactly that situation ...
oh is that the topic?
@hybrid spoke , @quaint mantle say's that you should drop 1.8 support no matter how many target audience you have
oh well, i couldnt do that either.
Exactly
free man, free, if your plugin is free then, welp you can do it.
@quaint mantle , that's nonsense you know that right?
Maybe if you got 10 servers running your plugin you can do that
but not with 3000 ...
Actually you can. You are the resource owner and if you are tired of supporting older versions, you can drop them. No one is forcing you to push updates (unless out of obligation for premium plugins). Also, if your plugin is open source, anyone could pick it up and continue using it so long as they update it.
i mean, he's not wrong, he can even if its a paid plugin
but he will loose his users
Exactly, but not at once
It takes time
Fair
You cannot just say from day to day
oh, dont support 1.8 in the first place, problem solved 😂
welp
go for <1.8
the thing is 1.8 is just too old to keep up
there are many 1.8 servers which will last years from now on
and people who can even support 1.4.6 to 1.18 is just unreal
NCP is built different
dont ever see 1.8 as your main version...
what you are you talking about?
What plugin are we even talking about here?
noname plugin
nah nothing, if you click on the github link you can see 1.4.6 to 1.18 is supported in ncp lol
the 1.4.6 cracked servers need NCP
they indeed can but they just dont want to. flex lol
i guess
or they really want to support 1.4.6, then i have no idea why they doing that 😂
but anyways what is ur plugin name?
mind if i check it out a bit?
I don't mind, the plugin is called sleep-most
oooooo open source
yes
No, 3k +
But it's growing fast
But it's not related, I know there is a website that can compare different spigot versions
whats the total count?
@quaint mantle , the number is not reliable I'm afraid
there was an issue that bstats didn't detect for all versions
I had to use a try catch for that
7
- bstats can easily be disabled
7 is the total? did they split the servers in different versions?
Hey, at the moment i programm an Spigot Fork and want to Change the Version (Ping), /ver command and so on. How i change this?
no, i mean 7 is the total servers using 1.8
seems like you should not do that
?
If your using a fork, you’d likely get better support in that fork’s discord.
You could try listening to the CommandPreProcessEvent and checking if the command is /ver.
he is forking
he wants to change the source directly
but its looks like he dont know how to fork
exactly
Ah, didn’t get that off my initial read.
I do, but i searched arround and dont find the Version actually
then you dont
I do.
I find the "This Server is running.." Message, but the Version is nowhere defined
will spigot freak out if i add extra stuff to my plugin.yml?
Extra stuff like?
why would you even add extra stuff to your plugin.yml
im tryna make a kind of discord-minecraft bridge, i figured it'd be easier, when registering the discord part of the commands, to read the same command info that spigot reads. but the discord part needs some extra info, hence why i want to add to it
so smth like this ```yaml
commands:
kit:
description: Your description
usage: /<command>
permission: yourplugin.yourcommandpermission
argsRequired: false
discordPermission: MESSAGE_SEND, MANAGE_CHANNEL
Because plugin.yml is really not for this
ik
searching it in server or api?
but i dont see the point in storing the same command info in 2 files
I find the Message in the Spigot-API. (Bukkit.java)
I don’t think spigot will throw any errors, but I haven’t tried it before. Also, AFAIK, there isn’t an easy way to access the plugin.yml with the api.
imagine bro
you dont really know how to fork spigot
welp
goodluck finding it in spigot-api
i mean, if it gets compiled into the plugin, i'm sure i'll be able to find a way to access it
One would think.
I know you can get the description from the plugin.yml, but I currently forget the method.
i found this https://docs.oracle.com/javase/8/docs/api/java/util/jar/JarFile.html however, i can find it in the java 17 docs
ah, i think i got it
you can read any extra information as you would for any yaml file
Hey, i got this line on my PlayerJoinEvent
OorlogSimulatie.getPlayerManagers().put(event.getPlayer(), new PlayerManager(event.getPlayer()));
And it gives this ClassNotFoundException/NoClassDefFoundError:
https://pastebin.com/Lc2JmU2K
This is my PlayerManager class
package me.branchyz.oorlogsimulatie.managers;
import org.bukkit.entity.Player;
public class PlayerManager {
private PlayerState playerState = PlayerState.SPAWN;
private Player player;
public PlayerManager(Player player) {
this.player = player;
//Teleport player to spawn.
}
public void setPlayerState(PlayerState playerState) {
this.playerState = playerState;
switch (playerState) {
case SPAWN:
//Teleport player to spawn.
break;
case INGAME:
break;
}
}
public PlayerState getPlayerState() {
return playerState;
}
public Player getPlayer() {
return player;
}
}
Why does it give this error?
After creating a Custom Event, is there a method that is supported by default?
supported by or for what?
like .getEntity to grab something entitys
Sure, if your event extends entity event
Did people really ping me into a discussion about dinosaurs versions that should rot in a hole?
Mfw
If you support 1.8 you can rot in the same hole
Thankfully most understand that supporting ancient versions is a waste of time and just hurts the quality of your product
So respectful, not ...
but I cant figure out why it is making the error
this is the code https://paste.md-5.net/ecihaloxif.java
Sender is Console?
Caused by: java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_17_R1.command.ColouredConsoleSender cannot be cast to class org.bukkit.entity.Player (org.bukkit.craftbukkit.v1_17_R1.command.ColouredC
why is it saying that?
so is it because I ran the command in console?
Yes
You need to check for the type first
Respect needs to be earned or deserved, 1.8 users and their supporters do neither
but my coooombat!!!
Can be adjusted to whatever you want on modern versions cause it's all configurable
People are just to dum to understand that
What is that supposed to mean lol
It's not because people enjoy the old combat mechanics more, that they are dumb.
The statements that you are making are purely from a developer perspective
Am saying you can change the combat mechanics to whatever you want on modern versions
So if that's your reason to not upgrade, you are dum
How so?
So what if people enjoy the old minecraft more then it is today? There are alot of other things that changed, not just the combat, mobs, blocks, biomes. What if they don't want all of that?
Wat
Anyway, I didn't tag you
🤦 just cause you're too lazy to support older versions doesn't mean everyone is.
I don’t get why people still can’t accept that the usage of obsolete and legacy software belongs to the problem set, not the solution set.
Look, the opinions around support for older versions is clearly different. And I don't mind anyone who gives their opinion on it. I once shared another opinion but that changed over time. But there is difference between telling what you believe is your opinion in a respectful way, and calling people who don't share the same opinion dumb
@hasty prawn , in theory, I just try to keep the same version (same jar) for each version. In theory I could say that if you want to make use of a 1.8 supported version, I could just say to use an older version
so from that perspective I agree
Half, if not more, of my plugins purchasers still use 1.8
But on the other hand,
I also did alot of improvements on my plugin in terms of usability that are not 1.16+ specific and then it's better to have the same jar
from developer perspective the support of older versions are a need for a more wide audience
Agree
I support on minions 1.8.8 up to 1.18.1 and on minions-revamped I support 1.18.1 down to 1.8.8
and its dumb
Can I make bungeecord plugin on Java 17?
Disagree
It's just a fact, today there is still most likely even more servers running 1.8 or using multiple versions then actually running the latest
It's not about lazyness
These people just enjoy the old version more
Why did Runescape introduce back the old-school version, because the community didn't like the new updates. It's another game but the same idea
1.8 accounts for around 6% of total servers
That's possible
the newer versions have the same things like the older ones AND MORE
I understand creating your plugins based around the audience you plan to sell it to. If your plugin is directed at users who mainly play on 1.8 servers of course most your sales will be 1.8.
But with that being said, support for 1.8 was dropped ages ago, and you can't expect to ever get support for it. It's a use at your own risk kinda thing.
Nah. Bstats is inaccurate lol. I along with hundreds of thousands of others disable bstats logging
you, as a server owner could just build a 1.8 network at 1.18
I agree with that yes
I'm not a server owner, I just listen for my community on their needs. They want a 1.8 support, and as long as it doesn't involve too much trouble, then why not
Thats the thing about statistics, it doesn't matter how many disable it, its a percentage.
if 50% of server owners disable BStats, the remaining is still an accurate representation
Well I understand if people like the features of 1.8 but those are replicable in 1.18 to the letter. However 1.8 as a software is objectively obsolete and legacy therefore it shouldn’t be needed to be used in a production environment.
Percentage of users that have it enabled or that use plug-ins with bstats
We are talking about a game here. If Mojang really shared the same opinion that 1.8 shouldn't be played anymore, then why did they introduce the option to play multiple versions
Wat
you cant just pull the publisher in it
Why this doesn't work?
Yes I agree, but I also can't blame developers for supporting 1.8 if that's what their communities are asking for. They're more stuck on 1.8 than developers are.
Its always been an option. They never added it.
Exactly, so why did they not remove it then
Why remove a function that gets used?
Listen software or not, people will play it still because mojang supports it
If you have the ability and power to change that, I believe it’s your responsibility to do so.
Any idea?
its BlockData not BlockState
I don't think we have the ability to change an entire communities mind about 1.8 vs latest.
as your exception says, you cant cast it
@compact cape
Oh thanks 😂
Yes indeed
But anyway
I respect anyones opinion on this topic
As long as it's respectful, and for some people here, that was clearly not the case
In the end it's just an opinion
Well, that’s up to you to decide, regardless the software for the version is in fact unsupported and mostly why people don’t go higher up is due to bullshit arguments and people constantly spreading false fud about newer versions.
But we have ability to not make 1.8 plugins 🤷
That's possible, but some people just enjoy it more I think
How so? you can achieve the equivalent experience in 1.18
Please concretize
yes you can
For example, I honnestly stopped following on all the new stuff years ago
not an argument
🤷♂️ I personally only support latest. I completely agree with you, but I also just understand their perspective as well.
What does that have to do with enjoying 1.8 more?
the only argument i accept is the new sneaking animation
cancel the mobs
New mobs are a reason to use 1.18 not 1.8
I don't like compromises. Supporting old shit is making compromises
because they are new? idk, you are complaining about them
Those flying devils were so much pain to me
when I saw them I thought, damn now they fucked up
I really didn't enjoy it
not really
1.8 is objectively bad, I’m out
I'm also going to retreat from the discussion
It's been enough, in the end it all started because of a simple question I had
because you dont have any valid points to defend your position
Not at all @hybrid spoke , I said more then enough
and in the end you digressed on your personal opinion
Exactly, and so did you
xD
And again, I just asked a question, then someone started this discussion
Look, there are facts and opinions, opinions are invalid
Can someone help, i'm getting classnotfound errors:
https://pastebin.com/Uz28EFyn
PlayerManager
https://pastebin.com/Aqvq4d8K
Code PlayerManager error
OorlogSimulatie.getPlayerManagers().put(event.getPlayer(), new PlayerManager(event.getPlayer()));
SetupManager
https://pastebin.com/9XD1XmW7
Code SetupManager error:
SetupGameMenu menu = new SetupGameMenu(OorlogSimulatie.getPlayerMenuUtility(player), new SetupManager());
Block hitting and sneaking animation are the only arguments for staying on 1.8 and those are miniscule in comparison to everything added/fixed SINCE 1.8
1.8 is just objectively broken at this point
they changed the block hit animation?
You just can't block hit after 1.8
oh you mean that one
Because shields
i thought of breaking a block
@wooden fable , you get that because you are missing a class
Oh no LOL
What do you mean?
How would i fix that?
No, i wrote the SetupManager and the PlayerManager
https://i.imgur.com/aTBHDV2.png -- img classes
You can make the exact equivalent with shields.
Your setup manager is not there when your project is compiled
Are you including it as dependency?
Or did you actually include the jars in your project?
Your setupManager is not there
i only included spigot with maven
Come PM for a moment
Nah it's not the same, it's close but not quite.
Anyone knows, what's the earliest bungeecord login event called, where I can see the player's username?
never lol
😂
are there different ways of programming in PAPI in 1.8?
because i'm getting this error with PAPI
How can you not make it equivalent ?
You can make the exact same damage reduction
You can remove the disable hit functionality
You can even mess with the knockback
And make sure the durability isn’t dropping
I agree that people should stop using 1.8, but the pvp on there will always be better. You can make it very close, but its mainly to do with the hit reg and a couple of other very small things that make it feel not quite the same.
Feel is a very subjective word
Can you prove it?
factually speaking
Not talking about textures or models
But pure functionality
If people wanted "hit reg" they would use 1.7.10 lol 1.8 isn't used solely for pvp
