Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e1bcda4
Merge branch 'master' into dev
AIPTU Jul 5, 2024
0d242d5
Merge branch 'master' into dev
Dec 1, 2025
f5ffff6
Merge branch 'master' into dev
AIPTU Dec 1, 2025
e996ded
Merge branch 'master' into dev
AIPTU Dec 1, 2025
f3c9dc8
refactor(utils): improve type safety and documentation in Utils class
AIPTU Dec 2, 2025
1acae92
refactor(SkinUtils): modernize with match expressions and cleanup
AIPTU Dec 2, 2025
df49d2a
chore: update composer dependencies
AIPTU Dec 2, 2025
0981e89
Change constants to typed declarations
AIPTU Dec 25, 2025
d7cff19
perf(emotes): optimize loading with O(1) lookups and async notifications
AIPTU Dec 26, 2025
da1922c
feat: implements new entities
AIPTU Dec 28, 2025
885c49a
feat!: Bump API version to 3.39.0
AIPTU Dec 28, 2025
cebb3f0
chore: update composer dependencies
AIPTU Dec 28, 2025
4f4a640
refactor: replace Promise system with native closures in SmaccerHandl…
AIPTU Dec 28, 2025
1cdc9f1
Update copyright years and refactor promise handling in utility classes
AIPTU Jan 28, 2026
e67e631
chore: update composer dependencies and phpstan configuration
AIPTU Feb 22, 2026
1d43fa8
chore: update composer dependencies
AIPTU May 18, 2026
1e9c99f
Merge remote-tracking branch 'origin/master' into dev
AIPTU May 18, 2026
d3fecb5
fix: error handling in LoadEmotesTask
AIPTU May 18, 2026
5744b83
feat: Add new NPC smaccers and update existing ones
AIPTU May 18, 2026
2ea5252
refactor: entity now organized by type category (hostile, neutral, etc.)
AIPTU May 21, 2026
94f5da5
build: update build workflow to include dev branch
AIPTU May 21, 2026
2c5be58
fix: ensure strict subclass checking for NPC registration
AIPTU May 21, 2026
2f467e2
Merge remote-tracking branch 'origin/master' into dev
AIPTU May 21, 2026
2706048
Revert "build: update build workflow to include dev branch"
AIPTU May 28, 2026
28f5856
[ci skip]
AIPTU May 28, 2026
15aa126
refactor: replace is_subclass_of with is_a for NPC registration checks
AIPTU May 28, 2026
3fe4d8b
Merge branch 'master' into dev
AIPTU May 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Build phar
on:
push:
branches: [master]
branches: [master, dev]
jobs:
pharynx:
name: build phar
permissions:
contents: write
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
Expand All @@ -20,7 +20,7 @@ jobs:
with:
additional-assets: |
icon.png
- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v6
with:
name: Smaccer.phar
path: ${{steps.pharynx.outputs.output-phar}}
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
name: Tests (PHP ${{ matrix.php }})
runs-on: ${{ matrix.image }}

strategy:
matrix:
image: [ubuntu-latest]
php: [8.5]

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

- name: Setup PHP
uses: pmmp/setup-php-action@3c38c259834f945351a662392836d90eb08abff0 # 3.2.0
with:
php-version: ${{ matrix.php }}
install-path: "./bin"
pm-version-major: "5"

- name: Restore Composer package cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
with:
path: |
~/.cache/composer/files
~/.cache/composer/vcs
key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}"
restore-keys: |
composer-v2-cache-

- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction

- name: Run PHPStan
run: ./vendor/bin/phpstan analyze --no-progress --memory-limit=2G
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Ignore Composer's vendor directory
vendor/
/vendor/
.build/
165 changes: 165 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
<?php

require_once __DIR__ . '/vendor/autoload.php';

use Ergebnis\License;
use Ergebnis\PhpCsFixer\Config;
use PhpCsFixerCustomFixers\Fixer;

$license = License\Type\MIT::markdown(
__DIR__ . '/LICENSE.md',
License\Range::since(
License\Year::fromString('2024'),
new \DateTimeZone('UTC'),
),
License\Holder::fromString('AIPTU'),
License\Url::fromString('https://github.com/AIPTU/Smaccer'),
);
$license->save();

$ruleSet = Config\RuleSet\Php85::create()
//->withHeader($license->header())
->withCustomFixers(Config\Fixers::fromFixers(
new Fixer\CommentSurroundedBySpacesFixer(),
new Fixer\CommentedOutFunctionFixer(),
new Fixer\ConstructorEmptyBracesFixer(),
new Fixer\EmptyFunctionBodyFixer(),
new Fixer\NoCommentedOutCodeFixer(),
new Fixer\NoDoctrineMigrationsGeneratedCommentFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\NoLeadingSlashInGlobalNamespaceFixer(),
new Fixer\NoNullableBooleanTypeFixer(),
new Fixer\NoPhpStormGeneratedCommentFixer(),
new Fixer\NoReferenceInFunctionDefinitionFixer(),
new Fixer\NoSuperfluousConcatenationFixer(),
new Fixer\NoTrailingCommaInSinglelineFixer(),
new Fixer\NoUselessCommentFixer(),
new Fixer\NoUselessDirnameCallFixer(),
new Fixer\NoUselessDoctrineRepositoryCommentFixer(),
new Fixer\NoUselessParenthesisFixer(),
new Fixer\NoUselessStrlenFixer(),
new Fixer\PhpdocNoIncorrectVarAnnotationFixer(),
new Fixer\PhpdocNoSuperfluousParamFixer(),
new Fixer\PhpdocParamTypeFixer(),
new Fixer\PhpdocSelfAccessorFixer(),
new Fixer\PhpdocSingleLineVarFixer(),
new Fixer\PhpdocTypesTrimFixer(),
new Fixer\PromotedConstructorPropertyFixer(),
new Fixer\ReadonlyPromotedPropertiesFixer(),
new Fixer\SingleSpaceAfterStatementFixer(),
new Fixer\StringableInterfaceFixer(),
))
->withRules(Config\Rules::fromArray([
'align_multiline_comment' => [
'comment_type' => 'phpdocs_only'
],
'blank_line_before_statement' => [
'statements' => [
'declare'
]
],
'blank_line_between_import_groups' => false,
'concat_space' => [
'spacing' => 'one'
],
'braces_position' => [
'classes_opening_brace' => 'same_line',
'functions_opening_brace' => 'same_line',
],
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
],
],
"date_time_immutable" => false,
'error_suppression' => [
'noise_remaining_usages' => false,
],
'final_class' => false,
'final_public_method_for_abstract_class' => false,
'global_namespace_import' => [
'import_constants' => true,
'import_functions' => true,
'import_classes' => null,
],
'header_comment' => [
'comment_type' => 'comment',
'header' => trim($license->header()),
'location' => 'after_open',
],
'mb_str_functions' => false,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'native_constant_invocation' => [
'scope' => 'namespaced'
],
'native_function_invocation' => [
'scope' => 'namespaced',
'include' => ['@all'],
],
'new_with_parentheses' => [
'named_class' => true,
'anonymous_class' => false,
],
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const',
],
'sort_algorithm' => 'alpha'
],
'ordered_class_elements' => false,
'phpdoc_align' => [
'align' => 'vertical',
'tags' => [
'param',
]
],
'phpdoc_line_span' => [
'property' => 'single',
'method' => null,
'const' => null
],
'phpdoc_list_type' => false,
'phpdoc_order' => [
'order' => [
'param',
'return',
'throws',
],
],
'phpdoc_types_order' => [
'null_adjustment' => 'always_last',
'sort_algorithm' => 'alpha',
],
'return_type_declaration' => [
'space_before' => 'one'
],
'simplified_if_return' => true,
'single_line_empty_body' => true,
'static_lambda' => false,
'strict_param' => true,
'trailing_comma_in_multiline' => [
'after_heredoc' => false,
'elements' => [
'arrays',
],
],
'use_arrow_functions' => true,
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
]));

$config = Config\Factory::fromRuleSet($ruleSet)
->setIndent("\t")
->setLineEnding("\n")
->setCacheFile(__DIR__ . '/.build/php-cs-fixer/.php-cs-fixer.cache');
$config->getFinder()
->in(__DIR__ . '/src');

return $config;
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

16 changes: 16 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# The MIT License (MIT)

Copyright (c) 2024-2026 AIPTU

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the _Software_), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED **AS IS**, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ npc-default-settings:
## Credits

- [Bedrock-Emotes by TwistedAsylumMC](https://github.com/TwistedAsylumMC/Bedrock-Emotes) for providing the emotes.
- [CPlot by ColinHDev](https://github.com/ColinHDev/CPlot) for implementing promises.

## Additional Notes

Expand Down
18 changes: 18 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,24 @@
"license": "MIT",
"type": "project",
"require": {
"php": "^8.3",
"aiptu/libplaceholder": "^1.0",
"frago9876543210/forms": "dev-master",
"ifera-mc/update-notifier": "dev-master",
"jasonw4331/libpmquery": "dev-master",
"paroxity/commando": "dev-master",
"pocketmine/pocketmine-mp": "^5.16"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.42",
"ergebnis/license": "^2.4",
"ergebnis/php-cs-fixer-config": "^6.26",
"friendsofphp/php-cs-fixer": "^3.54",
"kubawerlos/php-cs-fixer-custom-fixers": "^3.21",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0"
},
"repositories": [
{
"type": "vcs",
Expand All @@ -31,5 +42,12 @@
],
"autoload": {
"classmap": ["src"]
},
"config": {
"sort-packages": true,
"allow-plugins": {
"ergebnis/composer-normalize": true,
"phpstan/extension-installer": true
}
}
}
Loading
Loading