-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ride counters in rides menu, updated global config, reworked lo…
…re system for menus, fixed spawn entity packet for version later than 1.20.4
- Loading branch information
1 parent
8ba0d34
commit 4e740bc
Showing
32 changed files
with
963 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/main/java/com/jverbruggen/jrides/config/global/RidesMenuConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/************************************************************************************************************ | ||
* GPLv3 License * | ||
* * | ||
* Copyright (c) 2024-2024 JVerbruggen * | ||
* https://github.com/JVerbruggen/jrides * | ||
* * | ||
* This software is protected under the GPLv3 license, * | ||
* that can be found in the project's LICENSE file. * | ||
* * | ||
* In short, permission is hereby granted that anyone can copy, modify and distribute this software. * | ||
* You have to include the license and copyright notice with each and every distribution. You can use * | ||
* this software privately or commercially. Modifications to the code have to be indicated, and * | ||
* distributions of this code must be distributed with the same license, GPLv3. The software is provided * | ||
* without warranty. The software author or license can not be held liable for any damages * | ||
* inflicted by the software. * | ||
************************************************************************************************************/ | ||
|
||
package com.jverbruggen.jrides.config.global; | ||
|
||
import com.jverbruggen.jrides.config.coaster.objects.BaseConfig; | ||
import org.bukkit.configuration.ConfigurationSection; | ||
import org.bukkit.configuration.file.YamlConfiguration; | ||
|
||
public class RidesMenuConfig extends BaseConfig { | ||
private final boolean showCounters; | ||
|
||
public RidesMenuConfig(boolean showCounters) { | ||
this.showCounters = showCounters; | ||
} | ||
|
||
public boolean shouldShowCounters() { | ||
return showCounters; | ||
} | ||
|
||
public static void fillDefaults(YamlConfiguration yamlConfiguration){ | ||
yamlConfiguration.set("config.ridesMenu.showCounters", true); | ||
} | ||
|
||
public static RidesMenuConfig fromConfigurationSection(ConfigurationSection configurationSection){ | ||
boolean showCounters = getBoolean(configurationSection, "showCounters", true); | ||
|
||
return new RidesMenuConfig(showCounters); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.